agent-contracts 0.22.3 → 0.22.4

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.
@@ -11,8 +11,6 @@ dsl-auditor:
11
11
  - dsl-score-report
12
12
  can_write_artifacts:
13
13
  - dsl-audit-report
14
- can_invoke_agents:
15
- - dsl-auditor
16
14
  can_execute_tools:
17
15
  - agent-contracts-cli
18
16
  can_perform_validations:
@@ -29,6 +27,7 @@ dsl-auditor:
29
27
  - Report score-based improvement areas as audit recommendations (read-only; consumes dsl-score-report produced by dsl-designer)
30
28
  - Review DSL design for semantic coherence (role overlap, scope breadth, gate placement)
31
29
  - Verify generated prompts faithfully represent DSL intent (no hallucinated permissions)
30
+ - Audit x-* extension consumption across render templates and runtime codegen paths
32
31
  constraints:
33
32
  - Do not directly modify DSL definitions (read-only analysis)
34
33
  - Do not execute agent-contracts score independently; consume dsl-score-report produced by dsl-designer only
@@ -48,6 +47,15 @@ dsl-auditor:
48
47
  When a MISS is detected, classify the root cause as one of:
49
48
  template gap, data gap, or DSL gap.
50
49
  severity: mandatory
50
+ anti_patterns:
51
+ - >-
52
+ Directly editing DSL source files or generated outputs —
53
+ dsl-auditor is read-only; produce fix proposals in
54
+ dsl-audit-report instead and let dsl-designer apply them.
55
+ - >-
56
+ Running render or generate commands — these produce
57
+ side-effect file writes that belong to dsl-designer's scope;
58
+ use read-only commands (validate, lint, score, audit) only.
51
59
  escalation_criteria:
52
60
  - condition: 3 or more critical-level gaps detected
53
61
  action: stop_and_report
@@ -175,3 +183,24 @@ dsl-auditor:
175
183
  | 8 | Task completion criteria not reflected in prompt | warning |
176
184
  | 9 | Delegatable tasks not described in prompt | info |
177
185
  | 10 | Guardrail rules not reflected in prompt | warning |
186
+
187
+ - title: "Extension Consumption Audit Dimensions"
188
+ content: |
189
+ When performing `audit extensions` (extension consumption audit), check:
190
+
191
+ | # | Dimension | Severity |
192
+ |---|-----------|----------|
193
+ | 1 | Declared extension never populated on any entity | warning |
194
+ | 2 | Populated x-* not declared in extensions (when declarations exist) | info |
195
+ | 3 | Populated x-* not referenced in any render template | warning |
196
+ | 4 | Declared scope vs actual usage node type mismatch | warning |
197
+ | 5 | x-* with required: true but no render template consumption path | critical |
198
+ | 6 | x-* replicates standard DSL feature (semantic overlap) | warning |
199
+ | 7 | x-* unreachable in runtime codegen (not in AgentContract/TaskContract/WorkflowContract fixed fields) | info |
200
+ | 8 | Template references x-* key that is never populated in DSL | warning |
201
+
202
+ For each finding, recommend one of:
203
+ - **Remove**: Extension is dead weight — remove from declarations and entities
204
+ - **Migrate**: Extension duplicates a standard DSL feature — migrate to the standard field
205
+ - **Add template**: Extension carries useful data — add template support to consume it
206
+ - **Document**: Extension is metadata-only (not intended for render/runtime) — add description clarifying intent
@@ -15,8 +15,6 @@ dsl-designer:
15
15
  - dsl-source
16
16
  - dsl-generated-output
17
17
  - dsl-score-report
18
- can_invoke_agents:
19
- - dsl-designer
20
18
  can_execute_tools:
21
19
  - agent-contracts-cli
22
20
  can_perform_validations:
@@ -70,4 +70,4 @@ dsl-audit-report:
70
70
  - submitted
71
71
  required_validations:
72
72
  - dsl-audit-report-validation
73
- x-artifact-class: evidence
73
+ classification: evidence
@@ -93,8 +93,8 @@ audit-result:
93
93
  $ref: "#/components/schemas/agent-audit-result"
94
94
 
95
95
  dsl-audit-result:
96
- version: 3
97
- description: Result of DSL audit (completeness, semantic design, or prompt fidelity)
96
+ version: 4
97
+ description: Result of DSL audit (completeness, semantic design, prompt fidelity, or extensions)
98
98
  schema:
99
99
  type: object
100
100
  properties:
@@ -104,6 +104,7 @@ dsl-audit-result:
104
104
  - completeness
105
105
  - semantic
106
106
  - prompt
107
+ - extensions
107
108
  description: Which audit task produced this result
108
109
  total_dimensions:
109
110
  type: integer
@@ -123,16 +124,36 @@ dsl-audit-result:
123
124
  prompts_reviewed:
124
125
  type: integer
125
126
  description: Number of generated prompts compared (prompt audit)
126
- gate_analysis_complete:
127
- type: boolean
128
- description: >-
129
- True when workflow gate placement analysis has been performed
130
- (semantic audit completion criterion).
131
- guardrail_enforcement_verified:
132
- type: boolean
127
+ completion_criteria_coverage:
128
+ type: object
129
+ properties:
130
+ all_dimensions_inspected:
131
+ type: boolean
132
+ description: All required dimensions were inspected for all agents
133
+ gaps_classified:
134
+ type: boolean
135
+ description: Every detected gap has a root-cause classification
136
+ gate_analysis_complete:
137
+ type: boolean
138
+ description: Workflow gate placement analysis has been performed
139
+ guardrail_enforcement_verified:
140
+ type: boolean
141
+ description: All declared guardrails verified to exist in execution paths
142
+ scope_overlap_analyzed:
143
+ type: boolean
144
+ description: All agents reviewed for responsibility scope and role overlap
145
+ x_property_misuse_checked:
146
+ type: boolean
147
+ description: Custom x-* properties checked for standard DSL overlap
148
+ hallucinated_permissions_checked:
149
+ type: boolean
150
+ description: Generated prompts verified for permissions not declared in DSL
151
+ extension_consumption_checked:
152
+ type: boolean
153
+ description: All declared extensions checked for template/runtime consumption
133
154
  description: >-
134
- True when all declared guardrails have been verified to exist
135
- in execution paths (semantic audit completion criterion).
155
+ Per-criterion completion status. Each field maps to a
156
+ completion_criteria entry in the corresponding audit task.
136
157
  critical_gaps:
137
158
  type: array
138
159
  items:
@@ -180,3 +201,4 @@ dsl-audit-result:
180
201
  - total_dimensions
181
202
  - pass_count
182
203
  - miss_count
204
+ - completion_criteria_coverage
@@ -3,8 +3,6 @@
3
3
  update-dsl-definitions:
4
4
  description: Create new or update existing agent-contracts DSL definitions
5
5
  target_agent: dsl-designer
6
- allowed_from_agents:
7
- - dsl-designer
8
6
  workflow: dsl-update
9
7
  input_artifacts:
10
8
  - dsl-source
@@ -43,8 +41,6 @@ update-dsl-definitions:
43
41
  update-dsl-binding:
44
42
  description: Create new or update existing software bindings
45
43
  target_agent: dsl-designer
46
- allowed_from_agents:
47
- - dsl-designer
48
44
  workflow: dsl-update
49
45
  input_artifacts:
50
46
  - dsl-source
@@ -79,8 +75,6 @@ update-dsl-binding:
79
75
  render-dsl-outputs:
80
76
  description: Render prompts and documents from DSL and check for drift
81
77
  target_agent: dsl-designer
82
- allowed_from_agents:
83
- - dsl-designer
84
78
  workflow: dsl-update
85
79
  input_artifacts:
86
80
  - dsl-source
@@ -110,8 +104,6 @@ render-dsl-outputs:
110
104
  check-dsl-score:
111
105
  description: Check DSL completeness score and identify improvement areas
112
106
  target_agent: dsl-designer
113
- allowed_from_agents:
114
- - dsl-designer
115
107
  workflow: dsl-update
116
108
  input_artifacts:
117
109
  - dsl-source
@@ -143,8 +135,6 @@ check-dsl-score:
143
135
  audit-dsl-completeness:
144
136
  description: Audit completeness of DSL definitions against generated prompts
145
137
  target_agent: dsl-auditor
146
- allowed_from_agents:
147
- - dsl-auditor
148
138
  workflow: dsl-audit
149
139
  input_artifacts:
150
140
  - dsl-source
@@ -185,8 +175,6 @@ audit-dsl-completeness:
185
175
  audit-semantic-design:
186
176
  description: Audit DSL design for semantic coherence
187
177
  target_agent: dsl-auditor
188
- allowed_from_agents:
189
- - dsl-auditor
190
178
  workflow: dsl-audit
191
179
  input_artifacts:
192
180
  - dsl-source
@@ -231,8 +219,6 @@ audit-semantic-design:
231
219
  audit-generated-prompts:
232
220
  description: Audit generated prompts against DSL intent
233
221
  target_agent: dsl-auditor
234
- allowed_from_agents:
235
- - dsl-auditor
236
222
  workflow: dsl-audit
237
223
  input_artifacts:
238
224
  - dsl-source
@@ -269,3 +255,46 @@ audit-generated-prompts:
269
255
  escalation_criteria:
270
256
  - condition: Hallucinated permissions detected in generated prompts
271
257
  action: stop_and_report
258
+
259
+ audit-extension-consumption:
260
+ description: Audit declared x-* extensions for consumption gaps across render and runtime paths
261
+ target_agent: dsl-auditor
262
+ workflow: dsl-audit
263
+ input_artifacts:
264
+ - dsl-source
265
+ - dsl-generated-output
266
+ invocation_handoff: dsl-task-request
267
+ result_handoff: dsl-audit-result
268
+ validations:
269
+ - dsl-completeness-audit
270
+ - dsl-audit-report-validation
271
+ responsibilities:
272
+ - Cross-check extensions declarations against entity x-* usage
273
+ - Identify x-* properties populated in DSL but not consumed by any render template
274
+ - Detect semantic overlap between x-* extensions and standard DSL features
275
+ - Report runtime codegen reachability for each extension
276
+ - Distinguish intentional metadata-only extensions from consumption gaps
277
+ completion_criteria:
278
+ - All declared extensions checked for template and runtime consumption
279
+ - Unused extensions flagged with suggested action (remove, migrate to standard, or add template support)
280
+ - Runtime-unreachable extensions documented with explanation
281
+ - Findings classified with severity and category
282
+ execution_steps:
283
+ - id: collect-declarations
284
+ action: Collect extensions declarations and x-* usage map
285
+ reads_artifact: dsl-source
286
+ required: true
287
+ - id: collect-templates
288
+ action: Collect render template x-* references
289
+ reads_artifact: dsl-generated-output
290
+ required: true
291
+ - id: analyze-consumption
292
+ action: Cross-check declarations vs usage vs template references vs runtime fields
293
+ - id: analyze-semantics
294
+ action: Detect semantic overlap with standard DSL features
295
+ - id: produce-report
296
+ action: Produce extension consumption audit report
297
+ produces_artifact: dsl-audit-report
298
+ escalation_criteria:
299
+ - condition: Required extension with no consumption path detected
300
+ action: stop_and_report
@@ -4,7 +4,7 @@ dsl-schema-validation:
4
4
  executor_type: tool
5
5
  executor: agent-contracts-cli
6
6
  blocking: true
7
- x-description: >-
7
+ description: >-
8
8
  DSL schema validation via agent-contracts validate command.
9
9
  Performs type checks on all entities, verifies required fields,
10
10
  and checks cross-reference integrity.
@@ -15,7 +15,7 @@ dsl-lint-validation:
15
15
  executor_type: tool
16
16
  executor: agent-contracts-cli
17
17
  blocking: false
18
- x-description: >-
18
+ description: >-
19
19
  Semantic validation via agent-contracts lint command.
20
20
  Checks naming conventions, unused entities, circular references,
21
21
  and other design quality aspects.
@@ -26,7 +26,7 @@ dsl-score-validation:
26
26
  executor_type: tool
27
27
  executor: agent-contracts-cli
28
28
  blocking: false
29
- x-description: >-
29
+ description: >-
30
30
  Completeness evaluation via agent-contracts score command.
31
31
  Scores across 7 dimensions: artifact validation coverage,
32
32
  task validation coverage, guardrail policy coverage,
@@ -40,7 +40,7 @@ dsl-completeness-audit:
40
40
  executor: dsl-auditor
41
41
  blocking: false
42
42
  produces_evidence: dsl-audit-report
43
- x-description: >-
43
+ description: >-
44
44
  19-dimension cross-check audit of DSL definitions against generated
45
45
  prompts. Verifies that all items defined in the DSL are correctly
46
46
  reflected in generated output.
@@ -51,7 +51,7 @@ dsl-score-report-validation:
51
51
  executor_type: tool
52
52
  executor: agent-contracts-cli
53
53
  blocking: false
54
- x-description: >-
54
+ description: >-
55
55
  Validates that dsl-score-report has been produced and contains
56
56
  a valid score across all 7 dimensions.
57
57
 
@@ -61,6 +61,6 @@ dsl-audit-report-validation:
61
61
  executor_type: agent
62
62
  executor: dsl-auditor
63
63
  blocking: false
64
- x-description: >-
64
+ description: >-
65
65
  Validates that dsl-audit-report contains findings classified
66
66
  as PASS/MISS/PARTIAL for all inspected dimensions.
@@ -19,7 +19,8 @@ dsl-update:
19
19
  gate_kind: dsl-task-result
20
20
  description: >-
21
21
  Block if validation_result or lint_result did not pass in
22
- update-dsl-definitions.
22
+ update-dsl-definitions. Enforces dsl-validate-before-render
23
+ guardrail — prevents render from executing against invalid DSL.
23
24
  - type: delegate
24
25
  task: update-dsl-binding
25
26
  from_agent: dsl-designer
@@ -50,8 +51,9 @@ dsl-audit:
50
51
  description: >-
51
52
  DSL Audit — audit completeness of DSL definitions against generated
52
53
  prompts, detect gaps, and present improvement recommendations.
53
- Executed by DSL Auditor. Supports three audit types: render (semantic
54
- diff), dsl (design coherence), and prompt (prompt fidelity).
54
+ Executed by DSL Auditor. Supports four audit types: render (semantic
55
+ diff), dsl (design coherence), prompt (prompt fidelity), and
56
+ extensions (x-* consumption gap detection).
55
57
  entry_conditions:
56
58
  - DSL definition rendering is complete
57
59
  trigger: >-
@@ -77,6 +79,12 @@ dsl-audit:
77
79
  DSL Auditor reviews DSL design for semantic coherence —
78
80
  role overlap, scope breadth, gate placement, guardrail
79
81
  enforcement paths.
82
+ - type: gate
83
+ gate_kind: dsl-audit-result
84
+ depends_on: [audit-semantic-design]
85
+ description: >-
86
+ Semantic-design gate — block if critical design issues
87
+ detected (gate placement defects, handoff schema gaps).
80
88
  - type: delegate
81
89
  task: audit-generated-prompts
82
90
  from_agent: dsl-auditor
@@ -86,9 +94,23 @@ dsl-audit:
86
94
  detects missing requirements, hallucinated permissions,
87
95
  ambiguous instructions.
88
96
  - type: gate
89
- gate_kind: dsl-audit-terminal
90
- depends_on: [audit-semantic-design, audit-generated-prompts]
97
+ gate_kind: dsl-audit-result
98
+ depends_on: [audit-generated-prompts]
99
+ description: >-
100
+ Hallucinated-permissions gate — block immediately if
101
+ audit-generated-prompts detected permissions not declared
102
+ in DSL (enforces dsl-no-hallucinated-permissions guardrail).
103
+ - type: delegate
104
+ task: audit-extension-consumption
105
+ from_agent: dsl-auditor
106
+ depends_on: ["gate:dsl-audit-result"]
107
+ description: >-
108
+ DSL Auditor checks x-* extension properties for consumption
109
+ gaps — declared but unused, populated but not rendered,
110
+ semantic overlap with standard DSL features.
111
+ - type: gate
112
+ gate_kind: dsl-audit-result
113
+ depends_on: [audit-semantic-design, audit-generated-prompts, audit-extension-consumption]
91
114
  description: >-
92
- Terminal gate — block if audit-generated-prompts detected
93
- hallucinated permissions (enforces dsl-no-hallucinated-permissions
94
- guardrail at workflow level via stop_and_report escalation).
115
+ Terminal gate — aggregates all audit results and blocks if
116
+ any critical-level findings remain unresolved.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-contracts",
3
- "version": "0.22.3",
3
+ "version": "0.22.4",
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",