agent-contracts 0.25.0 → 0.30.1

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 CHANGED
@@ -1,9 +1,9 @@
1
1
  # yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
2
- cliContracts: 0.1.0
2
+ cli_contracts: 0.1.0
3
3
 
4
4
  info:
5
5
  title: agent-contracts CLI
6
- version: 0.22.6
6
+ version: 0.30.1
7
7
  description: >-
8
8
  Declarative YAML DSL toolkit for defining, validating, and rendering
9
9
  multi-agent development workflows. Provides static validation,
@@ -15,12 +15,32 @@ info:
15
15
  name: foo-ogawa
16
16
  url: https://github.com/foo-ogawa/agent-contracts
17
17
 
18
- commandSets:
18
+ artifact_slots:
19
+ dsl-definitions:
20
+ description: Agent contracts DSL YAML files (agent-contracts.yaml and extends targets)
21
+ direction: read
22
+ config:
23
+ description: agent-contracts.config.yaml configuration file
24
+ direction: read
25
+ generated-templates:
26
+ description: Rendered output files from Handlebars templates
27
+ direction: write
28
+ generated-guardrails:
29
+ description: Generated guardrail binding files (cursor-rules, AGENTS.md, etc.)
30
+ direction: write
31
+ generated-interface:
32
+ description: Generated team interface YAML/JSON files
33
+ direction: write
34
+ audit-report:
35
+ description: LLM audit result output files
36
+ direction: write
37
+
38
+ command_sets:
19
39
  agent-contracts:
20
40
  summary: Agent contracts tooling — validate, lint, render DSL files.
21
41
  executable: agent-contracts
22
42
 
23
- globalOptions:
43
+ global_options:
24
44
  - name: version
25
45
  aliases: [V]
26
46
  description: Print version and exit.
@@ -59,31 +79,31 @@ commandSets:
59
79
  file:
60
80
  mode: read
61
81
  exists: true
62
- mediaType: application/yaml
82
+ media_type: application/yaml
63
83
  encoding: utf-8
64
84
 
65
85
  options:
66
86
  - name: config
67
87
  aliases: [c]
68
88
  description: Path to agent-contracts.config.yaml.
69
- valueName: path
89
+ value_name: path
70
90
  schema:
71
91
  type: string
72
92
  file:
73
93
  mode: read
74
94
  exists: false
75
- mediaType: application/yaml
95
+ media_type: application/yaml
76
96
  encoding: utf-8
77
97
 
78
98
  - name: team
79
99
  description: Limit to one team (multi-team config only).
80
- valueName: id
100
+ value_name: id
81
101
  schema:
82
102
  type: string
83
103
 
84
104
  - name: format
85
105
  description: Output format.
86
- valueName: format
106
+ value_name: format
87
107
  schema:
88
108
  type: string
89
109
  enum: [text, json]
@@ -103,7 +123,7 @@ commandSets:
103
123
  description: Resolved DSL output successfully.
104
124
  stdout:
105
125
  format: '{options.format}'
106
- schemaNote: >-
126
+ schema_note: >-
107
127
  Output format depends on --format option. Defaults to
108
128
  text (YAML representation); json produces a JSON object.
109
129
 
@@ -138,31 +158,31 @@ commandSets:
138
158
  file:
139
159
  mode: read
140
160
  exists: true
141
- mediaType: application/yaml
161
+ media_type: application/yaml
142
162
  encoding: utf-8
143
163
 
144
164
  options:
145
165
  - name: config
146
166
  aliases: [c]
147
167
  description: Path to agent-contracts.config.yaml.
148
- valueName: path
168
+ value_name: path
149
169
  schema:
150
170
  type: string
151
171
  file:
152
172
  mode: read
153
173
  exists: false
154
- mediaType: application/yaml
174
+ media_type: application/yaml
155
175
  encoding: utf-8
156
176
 
157
177
  - name: team
158
178
  description: Limit to one team (multi-team config only).
159
- valueName: id
179
+ value_name: id
160
180
  schema:
161
181
  type: string
162
182
 
163
183
  - name: format
164
184
  description: Diagnostic output format.
165
- valueName: format
185
+ value_name: format
166
186
  schema:
167
187
  type: string
168
188
  enum: [text, json]
@@ -185,7 +205,7 @@ commandSets:
185
205
  description: Validation passed. No errors found.
186
206
  stdout:
187
207
  format: '{options.format}'
188
- schemaNote: >-
208
+ schema_note: >-
189
209
  Output format depends on --format option. Text shows
190
210
  human-readable diagnostics; json produces structured
191
211
  validation results.
@@ -220,31 +240,31 @@ commandSets:
220
240
  file:
221
241
  mode: read
222
242
  exists: true
223
- mediaType: application/yaml
243
+ media_type: application/yaml
224
244
  encoding: utf-8
225
245
 
226
246
  options:
227
247
  - name: config
228
248
  aliases: [c]
229
249
  description: Path to agent-contracts.config.yaml.
230
- valueName: path
250
+ value_name: path
231
251
  schema:
232
252
  type: string
233
253
  file:
234
254
  mode: read
235
255
  exists: false
236
- mediaType: application/yaml
256
+ media_type: application/yaml
237
257
  encoding: utf-8
238
258
 
239
259
  - name: team
240
260
  description: Limit to one team (multi-team config only).
241
- valueName: id
261
+ value_name: id
242
262
  schema:
243
263
  type: string
244
264
 
245
265
  - name: format
246
266
  description: Output format.
247
- valueName: format
267
+ value_name: format
248
268
  schema:
249
269
  type: string
250
270
  enum: [text, json]
@@ -267,7 +287,7 @@ commandSets:
267
287
  description: Lint passed. No errors or warnings.
268
288
  stdout:
269
289
  format: '{options.format}'
270
- schemaNote: >-
290
+ schema_note: >-
271
291
  Output format depends on --format option. Text shows
272
292
  human-readable diagnostics; json produces structured
273
293
  lint results.
@@ -295,32 +315,26 @@ commandSets:
295
315
  - agent-contracts render --quiet
296
316
 
297
317
  effects:
298
- riskLevel: medium
318
+ risk_level: medium
299
319
  writes:
300
- - target: "configured render output paths"
301
- description: "rendered template files from DSL input"
302
- overwrite: true
303
- idempotent: true
304
- idempotentNote: >-
305
- Output is deterministic from DSL input and templates.
306
- Repeated runs produce identical files.
320
+ - generated-templates
307
321
 
308
322
  options:
309
323
  - name: config
310
324
  aliases: [c]
311
325
  description: Path to agent-contracts.config.yaml.
312
- valueName: path
326
+ value_name: path
313
327
  schema:
314
328
  type: string
315
329
  file:
316
330
  mode: read
317
331
  exists: false
318
- mediaType: application/yaml
332
+ media_type: application/yaml
319
333
  encoding: utf-8
320
334
 
321
335
  - name: team
322
336
  description: Limit to one team (multi-team config only).
323
- valueName: id
337
+ value_name: id
324
338
  schema:
325
339
  type: string
326
340
 
@@ -350,7 +364,7 @@ commandSets:
350
364
  format: text
351
365
 
352
366
  x-agent:
353
- recommendedBeforeUse:
367
+ recommended_before_use:
354
368
  - Ensure agent-contracts.config.yaml exists with render targets.
355
369
  - Run validate first to confirm DSL is valid.
356
370
 
@@ -374,24 +388,24 @@ commandSets:
374
388
  - name: config
375
389
  aliases: [c]
376
390
  description: Path to agent-contracts.config.yaml.
377
- valueName: path
391
+ value_name: path
378
392
  schema:
379
393
  type: string
380
394
  file:
381
395
  mode: read
382
396
  exists: false
383
- mediaType: application/yaml
397
+ media_type: application/yaml
384
398
  encoding: utf-8
385
399
 
386
400
  - name: team
387
401
  description: Limit to one team (multi-team config only).
388
- valueName: id
402
+ value_name: id
389
403
  schema:
390
404
  type: string
391
405
 
392
406
  - name: format
393
407
  description: Diagnostic output format.
394
- valueName: format
408
+ value_name: format
395
409
  schema:
396
410
  type: string
397
411
  enum: [text, json]
@@ -414,7 +428,7 @@ commandSets:
414
428
  description: All checks passed.
415
429
  stdout:
416
430
  format: '{options.format}'
417
- schemaNote: >-
431
+ schema_note: >-
418
432
  Output format depends on --format option. Text shows
419
433
  human-readable pipeline summary; json produces structured
420
434
  results per pipeline stage.
@@ -427,7 +441,7 @@ commandSets:
427
441
  format: text
428
442
 
429
443
  x-agent:
430
- recommendedBeforeUse:
444
+ recommended_before_use:
431
445
  - Ensure agent-contracts.config.yaml exists.
432
446
 
433
447
  # ── score ─────────────────────────────────────────
@@ -457,31 +471,31 @@ commandSets:
457
471
  file:
458
472
  mode: read
459
473
  exists: true
460
- mediaType: application/yaml
474
+ media_type: application/yaml
461
475
  encoding: utf-8
462
476
 
463
477
  options:
464
478
  - name: config
465
479
  aliases: [c]
466
480
  description: Path to agent-contracts.config.yaml.
467
- valueName: path
481
+ value_name: path
468
482
  schema:
469
483
  type: string
470
484
  file:
471
485
  mode: read
472
486
  exists: false
473
- mediaType: application/yaml
487
+ media_type: application/yaml
474
488
  encoding: utf-8
475
489
 
476
490
  - name: team
477
491
  description: Limit to one team (multi-team config only).
478
- valueName: id
492
+ value_name: id
479
493
  schema:
480
494
  type: string
481
495
 
482
496
  - name: format
483
497
  description: Output format.
484
- valueName: format
498
+ value_name: format
485
499
  schema:
486
500
  type: string
487
501
  enum: [text, json]
@@ -489,7 +503,7 @@ commandSets:
489
503
 
490
504
  - name: threshold
491
505
  description: Minimum score; exit 1 if below (for CI gates).
492
- valueName: number
506
+ value_name: number
493
507
  schema:
494
508
  type: integer
495
509
 
@@ -498,7 +512,7 @@ commandSets:
498
512
  description: Score calculated (and above threshold if specified).
499
513
  stdout:
500
514
  format: '{options.format}'
501
- schemaNote: >-
515
+ schema_note: >-
502
516
  Output format depends on --format option. Text shows
503
517
  human-readable score breakdown; json produces structured
504
518
  score object with per-dimension details.
@@ -534,14 +548,19 @@ commandSets:
534
548
  - agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
535
549
 
536
550
  effects:
537
- riskLevel: medium
551
+ risk_level: medium
552
+ reads:
553
+ - dsl-definitions
554
+ - config
555
+ writes:
556
+ - audit-report
538
557
  network:
539
558
  description: >-
540
559
  LLM API calls to configured adapter (e.g. OpenAI,
541
560
  Gemini, Cursor). Incurs token cost and sends DSL
542
561
  content to the LLM provider.
543
562
  idempotent: false
544
- idempotentNote: >-
563
+ idempotent_note: >-
545
564
  LLM inference is non-deterministic — identical inputs
546
565
  may produce different findings across runs.
547
566
 
@@ -563,24 +582,24 @@ commandSets:
563
582
  - name: config
564
583
  aliases: [c]
565
584
  description: Path to agent-contracts.config.yaml.
566
- valueName: path
585
+ value_name: path
567
586
  schema:
568
587
  type: string
569
588
  file:
570
589
  mode: read
571
590
  exists: false
572
- mediaType: application/yaml
591
+ media_type: application/yaml
573
592
  encoding: utf-8
574
593
 
575
594
  - name: team
576
595
  description: Limit to one team (multi-team config only).
577
- valueName: id
596
+ value_name: id
578
597
  schema:
579
598
  type: string
580
599
 
581
600
  - name: format
582
601
  description: Output format.
583
- valueName: format
602
+ value_name: format
584
603
  schema:
585
604
  type: string
586
605
  enum: [text, json, markdown]
@@ -590,7 +609,7 @@ commandSets:
590
609
  description: >-
591
610
  Limit audit scope to specified entities
592
611
  (e.g. agents:architect,implementer).
593
- valueName: entities
612
+ value_name: entities
594
613
  schema:
595
614
  type: string
596
615
 
@@ -604,13 +623,13 @@ commandSets:
604
623
  description: >-
605
624
  SDK adapter to use for LLM calls
606
625
  (overrides config audit.adapter).
607
- valueName: name
626
+ value_name: name
608
627
  schema:
609
628
  type: string
610
629
 
611
630
  - name: model
612
631
  description: LLM model override (overrides config audit.model).
613
- valueName: name
632
+ value_name: name
614
633
  schema:
615
634
  type: string
616
635
 
@@ -618,7 +637,7 @@ commandSets:
618
637
  description: >-
619
638
  Minimum finding severity that causes exit 10
620
639
  (info|warning|error|critical).
621
- valueName: level
640
+ value_name: level
622
641
  schema:
623
642
  type: string
624
643
  enum: [info, warning, error, critical]
@@ -627,7 +646,7 @@ commandSets:
627
646
  - name: output
628
647
  aliases: [o]
629
648
  description: Write result to a file instead of stdout.
630
- valueName: file
649
+ value_name: file
631
650
  schema:
632
651
  type: string
633
652
  file:
@@ -638,7 +657,7 @@ commandSets:
638
657
  description: >-
639
658
  Alias for --format. When both are specified, --report-format
640
659
  takes precedence.
641
- valueName: fmt
660
+ value_name: fmt
642
661
  schema:
643
662
  type: string
644
663
  enum: [text, json, markdown]
@@ -665,7 +684,7 @@ commandSets:
665
684
  $ref: './dsl_base/components.yaml#/schemas/agent-audit-result'
666
685
  stderr:
667
686
  format: text
668
- schemaNote: >-
687
+ schema_note: >-
669
688
  Summary diagnostic on stderr. Structured findings are
670
689
  emitted on stdout in the requested format.
671
690
 
@@ -681,8 +700,8 @@ commandSets:
681
700
  format: text
682
701
 
683
702
  x-agent:
684
- retryableExitCodes: [12]
685
- recommendedBeforeUse:
703
+ retryable_exit_codes: [12]
704
+ recommended_before_use:
686
705
  - Ensure agent-contracts.config.yaml exists with render targets.
687
706
  - Run validate first to confirm DSL is valid.
688
707
  - Install agent-contracts-runtime if not using --dry-run.
@@ -711,18 +730,11 @@ commandSets:
711
730
  - agent-contracts generate interface -o team-interface.yaml --dry-run
712
731
 
713
732
  effects:
714
- riskLevel: low
733
+ risk_level: low
715
734
  writes:
716
- - target: "configured render, guardrail, and interface output paths"
717
- description: >-
718
- template files, guardrail binding files, and/or team
719
- interface files generated from DSL input
720
- overwrite: true
721
- idempotent: true
722
- idempotentNote: >-
723
- Output is deterministic from DSL input, templates,
724
- policies, and bindings. Repeated runs produce
725
- identical files.
735
+ - generated-templates
736
+ - generated-guardrails
737
+ - generated-interface
726
738
 
727
739
  arguments:
728
740
  - name: type
@@ -738,18 +750,18 @@ commandSets:
738
750
  - name: config
739
751
  aliases: [c]
740
752
  description: Path to agent-contracts.config.yaml.
741
- valueName: path
753
+ value_name: path
742
754
  schema:
743
755
  type: string
744
756
  file:
745
757
  mode: read
746
758
  exists: false
747
- mediaType: application/yaml
759
+ media_type: application/yaml
748
760
  encoding: utf-8
749
761
 
750
762
  - name: team
751
763
  description: Limit to one team (multi-team config only).
752
- valueName: id
764
+ value_name: id
753
765
  schema:
754
766
  type: string
755
767
 
@@ -763,7 +775,7 @@ commandSets:
763
775
 
764
776
  - name: binding
765
777
  description: Filter to specific software binding(s). Guardrails type only.
766
- valueName: name
778
+ value_name: name
767
779
  repeatable: true
768
780
  schema:
769
781
  type: string
@@ -771,17 +783,17 @@ commandSets:
771
783
  - name: output
772
784
  aliases: [o]
773
785
  description: Output path for generated team interface. Interface type only.
774
- valueName: path
786
+ value_name: path
775
787
  schema:
776
788
  type: string
777
789
  file:
778
790
  mode: write
779
- mediaType: application/yaml
791
+ media_type: application/yaml
780
792
  encoding: utf-8
781
793
 
782
794
  - name: format
783
795
  description: Output format for team interface (yaml or json). Interface type only.
784
- valueName: format
796
+ value_name: format
785
797
  schema:
786
798
  type: string
787
799
  enum: [yaml, json]
@@ -813,6 +825,89 @@ commandSets:
813
825
  format: text
814
826
 
815
827
  x-agent:
816
- recommendedBeforeUse:
828
+ recommended_before_use:
817
829
  - Ensure agent-contracts.config.yaml exists with render targets and/or binding definitions.
818
830
  - Run validate first to confirm DSL is valid.
831
+
832
+ # ── navigation-index ──────────────────────────────
833
+ navigation-index:
834
+ summary: Build artifact-centric navigation index from resolved DSL.
835
+ description: >-
836
+ Compiles a structured navigation index that maps each artifact
837
+ to its operations (producer, validator, consumer tools), agent
838
+ permissions (owner, editor, reader), inter-artifact relations,
839
+ and recommended action routes. The index is a queryable model
840
+ for runtime planners, guardrails, and governance tools.
841
+ usage:
842
+ - agent-contracts navigation-index
843
+ - agent-contracts navigation-index --format json
844
+ - agent-contracts navigation-index --artifact api-contracts
845
+ - agent-contracts navigation-index -c agent-contracts.config.yaml
846
+
847
+ arguments:
848
+ - name: dir
849
+ index: 0
850
+ required: false
851
+ description: Path to agent-contracts.yaml.
852
+ schema:
853
+ type: string
854
+ default: agent-contracts.yaml
855
+ file:
856
+ mode: read
857
+ exists: true
858
+ media_type: application/yaml
859
+ encoding: utf-8
860
+
861
+ options:
862
+ - name: config
863
+ aliases: [c]
864
+ description: Path to agent-contracts.config.yaml.
865
+ value_name: path
866
+ schema:
867
+ type: string
868
+ file:
869
+ mode: read
870
+ exists: false
871
+ media_type: application/yaml
872
+ encoding: utf-8
873
+
874
+ - name: team
875
+ description: Limit to one team (multi-team config only).
876
+ value_name: id
877
+ schema:
878
+ type: string
879
+
880
+ - name: format
881
+ description: Output format.
882
+ value_name: format
883
+ schema:
884
+ type: string
885
+ enum: [json, yaml]
886
+ default: json
887
+
888
+ - name: artifact
889
+ description: Filter output to a single artifact by ID.
890
+ value_name: id
891
+ schema:
892
+ type: string
893
+
894
+ - name: quiet
895
+ description: Suppress informational output.
896
+ schema:
897
+ type: boolean
898
+ default: false
899
+
900
+ exits:
901
+ '0':
902
+ description: Navigation index built successfully.
903
+ stdout:
904
+ format: '{options.format}'
905
+ schema_note: >-
906
+ Output format depends on --format option. JSON produces a
907
+ ProjectNavigationIndex object; yaml produces its YAML
908
+ representation.
909
+
910
+ '1':
911
+ description: Build failed — schema validation error, config error, or resolution failure.
912
+ stderr:
913
+ format: text