agent-contracts 0.25.0 → 0.30.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.
@@ -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.22.3
5
+ **Version:** 0.30.0
6
6
 
7
7
  ## Table of Contents
8
8
 
@@ -15,6 +15,7 @@ Declarative YAML DSL toolkit for defining, validating, and rendering multi-agent
15
15
  - [score](#agent-contracts-score)
16
16
  - [audit](#agent-contracts-audit)
17
17
  - [generate](#agent-contracts-generate)
18
+ - [navigation-index](#agent-contracts-navigation-index)
18
19
 
19
20
  ---
20
21
 
@@ -225,7 +226,7 @@ agent-contracts render --quiet
225
226
 
226
227
  ```yaml
227
228
  x-agent:
228
- recommendedBeforeUse:
229
+ recommended_before_use:
229
230
  - Ensure agent-contracts.config.yaml exists with render targets.
230
231
  - Run validate first to confirm DSL is valid.
231
232
  ```
@@ -274,7 +275,7 @@ agent-contracts check --format json --quiet
274
275
 
275
276
  ```yaml
276
277
  x-agent:
277
- recommendedBeforeUse:
278
+ recommended_before_use:
278
279
  - Ensure agent-contracts.config.yaml exists.
279
280
  ```
280
281
 
@@ -391,7 +392,7 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
391
392
  | Property | Type | Required | Description |
392
393
  |---|---|---|---|
393
394
  | `summary` | `string` | Yes | |
394
- | `riskLevel` | `"low" \| "medium" \| "high" \| "critical"` | Yes | |
395
+ | `risk_level` | `"low" \| "medium" \| "high" \| "critical"` | Yes | |
395
396
  | `findings` | `object[]` | Yes | |
396
397
  | `findings[].id` | `string` | No | Unique finding identifier. |
397
398
  | `findings[].severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
@@ -407,17 +408,17 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
407
408
  | `findings[].evidence[].location` | `string` | No | Location within the target (line number, JSON pointer). |
408
409
  | `findings[].evidence[].excerpt` | `string` | No | Relevant excerpt from the target. |
409
410
  | `findings[].details` | `Record<string, any>` | No | |
410
- | `recommendedActions` | `object[]` | No | |
411
- | `recommendedActions[].kind` | `enum(6 values)` | Yes | |
412
- | `recommendedActions[].title` | `string` | Yes | |
413
- | `recommendedActions[].command` | `string` | No | CLI command to run (for run_command kind). |
414
- | `recommendedActions[].target` | `string` | No | Target file or resource. |
415
- | `recommendedActions[].rationale` | `string` | No | |
411
+ | `recommended_actions` | `object[]` | No | |
412
+ | `recommended_actions[].kind` | `enum(6 values)` | Yes | |
413
+ | `recommended_actions[].title` | `string` | Yes | |
414
+ | `recommended_actions[].command` | `string` | No | CLI command to run (for run_command kind). |
415
+ | `recommended_actions[].target` | `string` | No | Target file or resource. |
416
+ | `recommended_actions[].rationale` | `string` | No | |
416
417
  | `metadata` | `object` | No | |
417
418
  | `metadata.tool` | `string` | No | |
418
419
  | `metadata.command` | `string` | No | |
419
420
  | `metadata.version` | `string` | No | |
420
- | `metadata.generatedAt` | `string` | No | |
421
+ | `metadata.generated_at` | `string` | No | |
421
422
  | `metadata.adapter` | `string` | No | |
422
423
  | `metadata.model` | `string` | No | |
423
424
 
@@ -430,14 +431,14 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
430
431
  "description": "Top-level result from an agent audit. Canonical schema for agent interoperability across toolchains.",
431
432
  "required": [
432
433
  "summary",
433
- "riskLevel",
434
+ "risk_level",
434
435
  "findings"
435
436
  ],
436
437
  "properties": {
437
438
  "summary": {
438
439
  "type": "string"
439
440
  },
440
- "riskLevel": {
441
+ "risk_level": {
441
442
  "type": "string",
442
443
  "enum": [
443
444
  "low",
@@ -537,7 +538,7 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
537
538
  }
538
539
  }
539
540
  },
540
- "recommendedActions": {
541
+ "recommended_actions": {
541
542
  "type": "array",
542
543
  "items": {
543
544
  "type": "object",
@@ -587,7 +588,7 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
587
588
  "version": {
588
589
  "type": "string"
589
590
  },
590
- "generatedAt": {
591
+ "generated_at": {
591
592
  "type": "string"
592
593
  },
593
594
  "adapter": {
@@ -615,7 +616,7 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
615
616
  | Property | Type | Required | Description |
616
617
  |---|---|---|---|
617
618
  | `summary` | `string` | Yes | |
618
- | `riskLevel` | `"low" \| "medium" \| "high" \| "critical"` | Yes | |
619
+ | `risk_level` | `"low" \| "medium" \| "high" \| "critical"` | Yes | |
619
620
  | `findings` | `object[]` | Yes | |
620
621
  | `findings[].id` | `string` | No | Unique finding identifier. |
621
622
  | `findings[].severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
@@ -631,17 +632,17 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
631
632
  | `findings[].evidence[].location` | `string` | No | Location within the target (line number, JSON pointer). |
632
633
  | `findings[].evidence[].excerpt` | `string` | No | Relevant excerpt from the target. |
633
634
  | `findings[].details` | `Record<string, any>` | No | |
634
- | `recommendedActions` | `object[]` | No | |
635
- | `recommendedActions[].kind` | `enum(6 values)` | Yes | |
636
- | `recommendedActions[].title` | `string` | Yes | |
637
- | `recommendedActions[].command` | `string` | No | CLI command to run (for run_command kind). |
638
- | `recommendedActions[].target` | `string` | No | Target file or resource. |
639
- | `recommendedActions[].rationale` | `string` | No | |
635
+ | `recommended_actions` | `object[]` | No | |
636
+ | `recommended_actions[].kind` | `enum(6 values)` | Yes | |
637
+ | `recommended_actions[].title` | `string` | Yes | |
638
+ | `recommended_actions[].command` | `string` | No | CLI command to run (for run_command kind). |
639
+ | `recommended_actions[].target` | `string` | No | Target file or resource. |
640
+ | `recommended_actions[].rationale` | `string` | No | |
640
641
  | `metadata` | `object` | No | |
641
642
  | `metadata.tool` | `string` | No | |
642
643
  | `metadata.command` | `string` | No | |
643
644
  | `metadata.version` | `string` | No | |
644
- | `metadata.generatedAt` | `string` | No | |
645
+ | `metadata.generated_at` | `string` | No | |
645
646
  | `metadata.adapter` | `string` | No | |
646
647
  | `metadata.model` | `string` | No | |
647
648
 
@@ -654,14 +655,14 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
654
655
  "description": "Top-level result from an agent audit. Canonical schema for agent interoperability across toolchains.",
655
656
  "required": [
656
657
  "summary",
657
- "riskLevel",
658
+ "risk_level",
658
659
  "findings"
659
660
  ],
660
661
  "properties": {
661
662
  "summary": {
662
663
  "type": "string"
663
664
  },
664
- "riskLevel": {
665
+ "risk_level": {
665
666
  "type": "string",
666
667
  "enum": [
667
668
  "low",
@@ -761,7 +762,7 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
761
762
  }
762
763
  }
763
764
  },
764
- "recommendedActions": {
765
+ "recommended_actions": {
765
766
  "type": "array",
766
767
  "items": {
767
768
  "type": "object",
@@ -811,7 +812,7 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
811
812
  "version": {
812
813
  "type": "string"
813
814
  },
814
- "generatedAt": {
815
+ "generated_at": {
815
816
  "type": "string"
816
817
  },
817
818
  "adapter": {
@@ -842,9 +843,9 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
842
843
 
843
844
  ```yaml
844
845
  x-agent:
845
- retryableExitCodes:
846
+ retryable_exit_codes:
846
847
  - 12
847
- recommendedBeforeUse:
848
+ recommended_before_use:
848
849
  - Ensure agent-contracts.config.yaml exists with render targets.
849
850
  - Run validate first to confirm DSL is valid.
850
851
  - Install agent-contracts-runtime if not using --dry-run.
@@ -924,9 +925,58 @@ agent-contracts generate interface -o team-interface.yaml --dry-run
924
925
 
925
926
  ```yaml
926
927
  x-agent:
927
- recommendedBeforeUse:
928
+ recommended_before_use:
928
929
  - Ensure agent-contracts.config.yaml exists with render targets and/or binding definitions.
929
930
  - Run validate first to confirm DSL is valid.
930
931
  ```
931
932
 
932
933
  ---
934
+
935
+ ### navigation-index
936
+
937
+ Build artifact-centric navigation index from resolved DSL.
938
+
939
+ Compiles a structured navigation index that maps each artifact to its operations (producer, validator, consumer tools), agent permissions (owner, editor, reader), inter-artifact relations, and recommended action routes. The index is a queryable model for runtime planners, guardrails, and governance tools.
940
+
941
+ **Usage:**
942
+
943
+ ```
944
+ agent-contracts navigation-index
945
+ ```
946
+ ```
947
+ agent-contracts navigation-index --format json
948
+ ```
949
+ ```
950
+ agent-contracts navigation-index --artifact api-contracts
951
+ ```
952
+ ```
953
+ agent-contracts navigation-index -c agent-contracts.config.yaml
954
+ ```
955
+
956
+ #### Arguments
957
+
958
+ | Name | Required | Description |
959
+ |---|---|---|
960
+ | `dir` | No | Path to agent-contracts.yaml. |
961
+
962
+ #### Options
963
+
964
+ | Option | Aliases | Required | Default | Description |
965
+ |---|---|---|---|---|
966
+ | `--config` | -c | No | | Path to agent-contracts.config.yaml. |
967
+ | `--team` | | No | | Limit to one team (multi-team config only). |
968
+ | `--format` | | No | `"json"` | Output format. |
969
+ | `--artifact` | | No | | Filter output to a single artifact by ID. |
970
+ | `--quiet` | | No | `false` | Suppress informational output. |
971
+
972
+ #### Exit Codes
973
+
974
+ **Exit 0:** Navigation index built successfully.
975
+
976
+ - **stdout:** format=`{options.format}`
977
+
978
+ **Exit 1:** Build failed — schema validation error, config error, or resolution failure.
979
+
980
+ - **stderr:** format=`text`
981
+
982
+ ---
@@ -4,13 +4,6 @@ dsl-auditor:
4
4
  Audit completeness of agent-contracts DSL definitions against generated
5
5
  agent prompts, detect gaps, and present improvement recommendations.
6
6
  mode: read-write
7
- can_read_artifacts:
8
- - dsl-source
9
- - dsl-generated-output
10
- - dsl-audit-report
11
- - dsl-score-report
12
- can_write_artifacts:
13
- - dsl-audit-report
14
7
  can_execute_tools:
15
8
  - agent-contracts-cli
16
9
  can_perform_validations:
@@ -36,8 +29,9 @@ dsl-auditor:
36
29
  rules:
37
30
  - id: R-AUDIT-001
38
31
  description: >-
39
- Audit must cover all 19 dimensions: purpose, mode, can_read_artifacts,
40
- can_write_artifacts, can_invoke_agents, tools, can_perform_validations,
32
+ Audit must cover all 19 dimensions: purpose, mode,
33
+ can_read_artifacts (deprecated), can_write_artifacts (deprecated),
34
+ can_invoke_agents, tools, can_perform_validations,
41
35
  responsibilities, constraints, rules, escalation_criteria, x-authority,
42
36
  supported_tasks, delegatable_tasks, handoff_schemas, guardrails,
43
37
  anti_patterns, x-audit-checklist, x-sections.
@@ -75,8 +69,8 @@ dsl-auditor:
75
69
  |---|-----------|------------|
76
70
  | 1 | purpose | high |
77
71
  | 2 | mode | high |
78
- | 3 | can_read_artifacts | high |
79
- | 4 | can_write_artifacts + required_validations | **critical** |
72
+ | 3 | can_read_artifacts (deprecated) | high |
73
+ | 4 | can_write_artifacts + required_validations (deprecated: can_write_artifacts) | **critical** |
80
74
  | 5 | can_invoke_agents | high |
81
75
  | 6 | tools (can_execute_tools → tools.yaml) | medium |
82
76
  | 7 | can_perform_validations | high |
@@ -6,15 +6,6 @@ dsl-designer:
6
6
  Holds specification knowledge of DSL structure, schemas, merge operators,
7
7
  and variable substitution.
8
8
  mode: read-write
9
- can_read_artifacts:
10
- - dsl-source
11
- - dsl-generated-output
12
- - dsl-score-report
13
- - dsl-audit-report
14
- can_write_artifacts:
15
- - dsl-source
16
- - dsl-generated-output
17
- - dsl-score-report
18
9
  can_execute_tools:
19
10
  - agent-contracts-cli
20
11
  can_perform_validations:
@@ -47,8 +38,7 @@ dsl-designer:
47
38
  - id: R-DSL-002
48
39
  description: >-
49
40
  When adding a new agent, explicitly define all permission fields:
50
- can_read_artifacts, can_write_artifacts, can_invoke_agents,
51
- can_execute_tools, can_perform_validations.
41
+ can_invoke_agents, can_execute_tools, can_perform_validations.
52
42
  severity: mandatory
53
43
  - id: R-DSL-003
54
44
  description: >-
@@ -137,8 +127,8 @@ dsl-designer:
137
127
  purpose: string # Agent purpose (required)
138
128
  mode: read-write | read-only # Operation mode (default: read-write)
139
129
  dispatch_only: boolean # true = dispatch only, no implementation (default: false)
140
- can_read_artifacts: [] # Readable artifact ID list
141
- can_write_artifacts: [] # Writable artifact ID list
130
+ can_read_artifacts: [] # (deprecated) Readable artifact ID list
131
+ can_write_artifacts: [] # (deprecated) Writable artifact ID list
142
132
  can_execute_tools: [] # Executable tool ID list
143
133
  can_perform_validations: [] # Executable validation ID list
144
134
  can_invoke_agents: [] # Invocable agent ID list
@@ -190,10 +180,10 @@ dsl-designer:
190
180
  <artifact-id>:
191
181
  type: doc | schema | code | config | html
192
182
  description: string # Description (required)
193
- owner: string # Owner agent ID (required)
194
- producers: [] # Producer agent ID list
195
- editors: [] # Editor agent ID list
196
- consumers: [] # Consumer agent ID list
183
+ owner: string # (deprecated) Owner agent ID
184
+ producers: [] # (deprecated) Producer agent ID list
185
+ editors: [] # (deprecated) Editor agent ID list
186
+ consumers: [] # (deprecated) Consumer agent ID list
197
187
  states: [] # Lifecycle states
198
188
  required_validations: [] # Required validation ID list
199
189
  visibility: project | team | external
@@ -4,13 +4,6 @@ dsl-source:
4
4
  agent-contracts DSL source files — YAML definitions for agents, tasks,
5
5
  artifacts, tools, validations, handoff_types, workflow, policies,
6
6
  guardrails, guardrail_policies, and bindings.
7
- owner: dsl-designer
8
- producers:
9
- - dsl-designer
10
- editors:
11
- - dsl-designer
12
- consumers:
13
- - dsl-auditor
14
7
  states:
15
8
  - draft
16
9
  - validated
@@ -24,13 +17,6 @@ dsl-generated-output:
24
17
  description: >-
25
18
  Files generated from DSL via render — agent prompts, overview documents,
26
19
  workflow commands, guardrail configurations, etc.
27
- owner: dsl-designer
28
- producers:
29
- - dsl-designer
30
- editors:
31
- - dsl-designer
32
- consumers:
33
- - dsl-auditor
34
20
  states:
35
21
  - generated
36
22
  - verified
@@ -42,13 +28,6 @@ dsl-score-report:
42
28
  description: >-
43
29
  Output of agent-contracts score command — completeness evaluation
44
30
  across 7 dimensions.
45
- owner: dsl-designer
46
- producers:
47
- - dsl-designer
48
- editors:
49
- - dsl-designer
50
- consumers:
51
- - dsl-auditor
52
31
  states:
53
32
  - generated
54
33
  required_validations:
@@ -59,13 +38,6 @@ dsl-audit-report:
59
38
  description: >-
60
39
  DSL completeness audit report — PASS/MISS matrix across 19 dimensions,
61
40
  gap analysis, and improvement recommendations.
62
- owner: dsl-auditor
63
- producers:
64
- - dsl-auditor
65
- editors:
66
- - dsl-auditor
67
- consumers:
68
- - dsl-designer
69
41
  states:
70
42
  - submitted
71
43
  required_validations:
@@ -78,18 +78,18 @@ schemas:
78
78
  description: >-
79
79
  Top-level result from an agent audit.
80
80
  Canonical schema for agent interoperability across toolchains.
81
- required: [summary, riskLevel, findings]
81
+ required: [summary, risk_level, findings]
82
82
  properties:
83
83
  summary:
84
84
  type: string
85
- riskLevel:
85
+ risk_level:
86
86
  type: string
87
87
  enum: [low, medium, high, critical]
88
88
  findings:
89
89
  type: array
90
90
  items:
91
91
  $ref: "#/schemas/agent-finding"
92
- recommendedActions:
92
+ recommended_actions:
93
93
  type: array
94
94
  items:
95
95
  $ref: "#/schemas/agent-recommended-action"
@@ -102,7 +102,7 @@ schemas:
102
102
  type: string
103
103
  version:
104
104
  type: string
105
- generatedAt:
105
+ generated_at:
106
106
  type: string
107
107
  adapter:
108
108
  type: string
@@ -48,6 +48,7 @@ update-dsl-binding:
48
48
  result_handoff: dsl-task-result
49
49
  validations:
50
50
  - dsl-schema-validation
51
+ - dsl-lint-validation
51
52
  responsibilities:
52
53
  - Add and update guardrail_impl check definitions
53
54
  - Configure outputs section templates and inline templates
@@ -82,6 +83,7 @@ render-dsl-outputs:
82
83
  result_handoff: dsl-task-result
83
84
  validations:
84
85
  - dsl-schema-validation
86
+ - dsl-completeness-audit
85
87
  responsibilities:
86
88
  - Generate prompts and documents via agent-contracts render
87
89
  - Detect and resolve drift using render --check
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-contracts",
3
- "version": "0.25.0",
3
+ "version": "0.30.0",
4
4
  "description": "Declarative YAML DSL toolkit for defining, validating, and rendering multi-agent development workflows",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -64,7 +64,7 @@
64
64
  "@stoplight/spectral-functions": "^1.9.0",
65
65
  "@stoplight/spectral-rulesets": "^1.22.1",
66
66
  "ajv": "^8.18.0",
67
- "cli-contracts": "^0.7.2",
67
+ "cli-contracts": "^0.30.0",
68
68
  "commander": "^14.0.3",
69
69
  "handlebars": "^4.7.9",
70
70
  "yaml": "^2.8.3",