agent-contracts 0.19.5 → 0.21.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/README.md CHANGED
@@ -151,11 +151,11 @@ artifacts:
151
151
  states: [draft, reviewed, approved]
152
152
  ````
153
153
 
154
- Validate and render:
154
+ Validate and generate:
155
155
 
156
156
  ````bash
157
157
  agent-contracts validate
158
- agent-contracts render -c agent-contracts.config.yaml
158
+ agent-contracts generate -c agent-contracts.config.yaml
159
159
  ````
160
160
 
161
161
 
@@ -1028,12 +1028,14 @@ npx agent-contracts
1028
1028
  | `agent-contracts resolve [path]` | Resolve `extends` inheritance and output resolved YAML |
1029
1029
  | `agent-contracts validate [path]` | Validate schema and references |
1030
1030
  | `agent-contracts lint [path]` | Run semantic lint |
1031
- | `agent-contracts render` | Render outputs from config |
1032
- | `agent-contracts score [path]` | Calculate DSL completeness score |
1031
+ | `agent-contracts generate` | Generate all artifacts (templates + guardrails + interface) |
1032
+ | `agent-contracts generate templates` | Render template outputs from config |
1033
1033
  | `agent-contracts generate guardrails` | Generate guardrail artifacts from bindings |
1034
- | `agent-contracts generate interface` | Generate team interface YAML from DSL |
1034
+ | `agent-contracts generate interface` | Generate team interface YAML from DSL |
1035
+ | `agent-contracts score [path]` | Calculate DSL completeness score |
1035
1036
  | `agent-contracts audit <type>` | Run LLM-based semantic audit (render/dsl/prompt/all) |
1036
1037
  | `agent-contracts check` | Run resolve → validate → lint → render --check |
1038
+ | `agent-contracts render` | _(deprecated)_ Alias for `generate templates` |
1037
1039
 
1038
1040
  The `[path]` argument defaults to `agent-contracts.yaml` in the current directory.
1039
1041
  If `-c` / `--config` is specified, the DSL path from the config file is used.
@@ -1100,8 +1102,9 @@ agent-contracts lint --strict
1100
1102
  agent-contracts score
1101
1103
  agent-contracts score -c agent-contracts.config.yaml --threshold 70
1102
1104
  agent-contracts score --format json
1103
- agent-contracts render -c agent-contracts.config.yaml
1104
- agent-contracts render -c agent-contracts.config.yaml --check
1105
+ agent-contracts generate -c agent-contracts.config.yaml
1106
+ agent-contracts generate templates -c agent-contracts.config.yaml
1107
+ agent-contracts generate templates -c agent-contracts.config.yaml --check
1105
1108
  agent-contracts check -c agent-contracts.config.yaml --strict
1106
1109
  agent-contracts generate interface -c agent-contracts.config.yaml
1107
1110
  agent-contracts generate interface -c agent-contracts.config.yaml --dry-run
@@ -1239,7 +1242,7 @@ renders:
1239
1242
 
1240
1243
  Tools with `x-script` get a generated script file; tools without it produce no file at all.
1241
1244
 
1242
- `skip_empty` also works with `render --check` (drift detection): when the expected output is empty, the check expects the file to **not exist** and reports drift if it does.
1245
+ `skip_empty` also works with `generate templates --check` (drift detection): when the expected output is empty, the check expects the file to **not exist** and reports drift if it does.
1243
1246
 
1244
1247
  ### Available context types
1245
1248
 
@@ -1724,7 +1727,7 @@ A practical model is:
1724
1727
 
1725
1728
  1. define the workflow in YAML
1726
1729
  2. validate and lint it in CI
1727
- 3. render prompts and derived docs
1730
+ 3. generate prompts and derived docs
1728
1731
  4. execute the workflow in your runtime of choice
1729
1732
 
1730
1733
  That separation keeps runtime concerns and architecture concerns from being mixed together.
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.19.4
6
+ version: 0.21.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,14 +298,21 @@ commandSets:
294
298
  requiresConfirmation: false
295
299
  idempotent: true
296
300
  sideEffects: []
301
+ expectedDurationMs: 3000
302
+ retryableExitCodes: []
297
303
 
298
- # ── render ────────────────────────────────────────
304
+ # ── render (deprecated alias) ─────────────────────
299
305
  render:
300
- summary: Render resolved DSL with Handlebars templates.
306
+ summary: (deprecated) Alias for 'generate templates'.
307
+ deprecated:
308
+ message: >-
309
+ Use 'agent-contracts generate templates' instead.
310
+ alternative: generate templates
301
311
  description: >-
312
+ Deprecated alias for 'agent-contracts generate templates'.
302
313
  Renders output files from the resolved DSL using Handlebars
303
- templates configured in agent-contracts.config.yaml. Supports
304
- drift detection via --check mode. Requires a config file.
314
+ templates and emits a deprecation warning. Supports --check
315
+ for drift detection. Requires a config file.
305
316
  usage:
306
317
  - agent-contracts render -c agent-contracts.config.yaml
307
318
  - agent-contracts render -c agent-contracts.config.yaml --check
@@ -327,7 +338,7 @@ commandSets:
327
338
  type: string
328
339
 
329
340
  - name: check
330
- description: Check for drift without writing files.
341
+ description: Check for template drift without writing files.
331
342
  schema:
332
343
  type: boolean
333
344
  default: false
@@ -340,14 +351,14 @@ commandSets:
340
351
 
341
352
  exits:
342
353
  '0':
343
- description: Render succeeded (or no drift detected in --check mode).
354
+ description: Generation succeeded (or no drift detected in --check mode).
344
355
  stdout:
345
356
  format: text
346
357
 
347
358
  '1':
348
359
  description: >-
349
- Render failed, config not found, schema validation failed,
350
- or drift detected in --check mode.
360
+ Generation failed, config not found, schema validation
361
+ failed, or drift detected in --check mode.
351
362
  stderr:
352
363
  format: text
353
364
 
@@ -357,9 +368,8 @@ commandSets:
357
368
  idempotent: true
358
369
  idempotentNote: >-
359
370
  Output is deterministic from DSL input and templates.
360
- Repeated runs produce identical files. Confirmation is not
361
- required because the command is idempotent and --check
362
- provides a side-effect-free preview mode.
371
+ Repeated runs produce identical files. This is a
372
+ deprecated alias; prefer 'generate templates'.
363
373
  sideEffects:
364
374
  - file_write
365
375
  sideEffectNote: >-
@@ -369,6 +379,8 @@ commandSets:
369
379
  recommendedBeforeUse:
370
380
  - Ensure agent-contracts.config.yaml exists with render targets.
371
381
  - Run validate first to confirm DSL is valid.
382
+ expectedDurationMs: 5000
383
+ retryableExitCodes: []
372
384
 
373
385
  # ── check ─────────────────────────────────────────
374
386
  check:
@@ -449,6 +461,8 @@ commandSets:
449
461
  sideEffects: []
450
462
  recommendedBeforeUse:
451
463
  - Ensure agent-contracts.config.yaml exists.
464
+ expectedDurationMs: 10000
465
+ retryableExitCodes: []
452
466
 
453
467
  # ── score ─────────────────────────────────────────
454
468
  score:
@@ -535,6 +549,8 @@ commandSets:
535
549
  requiresConfirmation: false
536
550
  idempotent: true
537
551
  sideEffects: []
552
+ expectedDurationMs: 5000
553
+ retryableExitCodes: []
538
554
 
539
555
  # ── audit ───────────────────────────────────────────
540
556
  audit:
@@ -716,15 +732,20 @@ commandSets:
716
732
 
717
733
  # ── generate ──────────────────────────────────────
718
734
  generate:
719
- summary: Generate guardrail or interface artifacts from DSL.
735
+ summary: Generate artifacts from DSL — templates, guardrails, and/or interface.
720
736
  description: >-
721
- Generates runtime artifacts from the DSL. When type is
722
- "guardrails" (default), produces guardrail binding files from
723
- DSL, policies, and software bindings. When type is "interface",
724
- generates a team interface YAML/JSON file from the DSL's
725
- team_interface section.
737
+ Unified generation command. When type is omitted, runs all
738
+ generation targets (templates, guardrails, interface). When
739
+ type is "templates", renders output files from the DSL using
740
+ Handlebars templates. When type is "guardrails", produces
741
+ guardrail binding files from DSL, policies, and software
742
+ bindings. When type is "interface", generates a team interface
743
+ YAML/JSON file from the DSL's team_interface section.
726
744
  usage:
745
+ - agent-contracts generate
727
746
  - agent-contracts generate -c agent-contracts.config.yaml
747
+ - agent-contracts generate templates
748
+ - agent-contracts generate templates --check
728
749
  - agent-contracts generate guardrails -c agent-contracts.config.yaml
729
750
  - agent-contracts generate guardrails --binding cursor-rules
730
751
  - agent-contracts generate guardrails --dry-run
@@ -736,11 +757,11 @@ commandSets:
736
757
  - name: type
737
758
  index: 0
738
759
  required: false
739
- description: Type of artifacts to generate.
760
+ description: >-
761
+ Type of artifacts to generate. Omit to run all targets.
740
762
  schema:
741
763
  type: string
742
- enum: [guardrails, interface]
743
- default: guardrails
764
+ enum: [templates, guardrails, interface]
744
765
 
745
766
  options:
746
767
  - name: config
@@ -761,6 +782,14 @@ commandSets:
761
782
  schema:
762
783
  type: string
763
784
 
785
+ - name: check
786
+ description: >-
787
+ Check for template drift without writing files.
788
+ Only applies to the templates target.
789
+ schema:
790
+ type: boolean
791
+ default: false
792
+
764
793
  - name: binding
765
794
  description: Filter to specific software binding(s). Guardrails type only.
766
795
  valueName: name
@@ -801,14 +830,14 @@ commandSets:
801
830
 
802
831
  exits:
803
832
  '0':
804
- description: Generation succeeded.
833
+ description: Generation succeeded (or no drift detected in --check mode).
805
834
  stdout:
806
835
  format: text
807
836
 
808
837
  '1':
809
838
  description: >-
810
839
  Generation failed — unknown type, schema validation failed,
811
- config not found, or error-level diagnostics.
840
+ config not found, drift detected, or error-level diagnostics.
812
841
  stderr:
813
842
  format: text
814
843
 
@@ -817,18 +846,21 @@ commandSets:
817
846
  requiresConfirmation: false
818
847
  idempotent: true
819
848
  idempotentNote: >-
820
- Output is deterministic from DSL input, policies, and
821
- bindings. Repeated runs produce identical files.
849
+ Output is deterministic from DSL input, templates, policies,
850
+ and bindings. Repeated runs produce identical files.
822
851
  Confirmation is not required because the command is
823
- idempotent and --dry-run provides a side-effect-free
824
- preview mode.
852
+ idempotent and --dry-run / --check provide side-effect-free
853
+ preview modes.
825
854
  sideEffects:
826
855
  - file_write
827
856
  sideEffectNote: >-
828
- Writes guardrail binding files or team interface files to
829
- configured output paths. No file writes occur when
830
- --dry-run is specified.
857
+ Writes rendered template files, guardrail binding files,
858
+ and/or team interface files to configured output paths.
859
+ No file writes occur when --dry-run or --check is specified
860
+ (--check applies to templates only).
831
861
  safeDryRunOption: dry-run
832
862
  recommendedBeforeUse:
833
- - Ensure agent-contracts.config.yaml exists with binding definitions.
863
+ - Ensure agent-contracts.config.yaml exists with render targets and/or binding definitions.
834
864
  - Run validate first to confirm DSL is valid.
865
+ expectedDurationMs: 5000
866
+ retryableExitCodes: []