agent-contracts 0.19.3 → 0.19.5
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 +56 -19
- package/dist/cli.js +73 -35
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +36 -11
- package/dist/index.js.map +1 -1
- package/dsl_base/agent-contracts.yaml +18 -0
- package/dsl_base/agent-runtime.config.yaml +2 -0
- package/dsl_base/agents/dsl-auditor.yaml +176 -0
- package/dsl_base/agents/dsl-designer.yaml +433 -0
- package/dsl_base/artifacts.yaml +73 -0
- package/dsl_base/audit-test.config.yaml +2 -0
- package/dsl_base/components.yaml +110 -0
- package/dsl_base/guardrail-policies.yaml +18 -0
- package/dsl_base/guardrails.yaml +46 -0
- package/dsl_base/handoff-types.yaml +182 -0
- package/dsl_base/tasks.yaml +269 -0
- package/dsl_base/tools.yaml +50 -0
- package/dsl_base/validations.yaml +66 -0
- package/dsl_base/workflow.yaml +91 -0
- package/package.json +3 -2
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
agent-contracts-cli:
|
|
2
|
+
kind: cli
|
|
3
|
+
description: >-
|
|
4
|
+
agent-contracts CLI — execute resolve, validate, lint, render, score,
|
|
5
|
+
check, and generate commands for the DSL.
|
|
6
|
+
input_artifacts:
|
|
7
|
+
- dsl-source
|
|
8
|
+
output_artifacts:
|
|
9
|
+
- dsl-generated-output
|
|
10
|
+
- dsl-score-report
|
|
11
|
+
invokable_by:
|
|
12
|
+
- dsl-designer
|
|
13
|
+
- dsl-auditor
|
|
14
|
+
side_effects: []
|
|
15
|
+
commands:
|
|
16
|
+
- command: "npx agent-contracts validate"
|
|
17
|
+
category: verification
|
|
18
|
+
reads: [dsl-source]
|
|
19
|
+
writes: []
|
|
20
|
+
purpose: DSL schema validation and reference checks
|
|
21
|
+
- command: "npx agent-contracts lint"
|
|
22
|
+
category: verification
|
|
23
|
+
reads: [dsl-source]
|
|
24
|
+
writes: []
|
|
25
|
+
purpose: Semantic lint
|
|
26
|
+
- command: "npx agent-contracts render -c agent-contracts.config.yaml"
|
|
27
|
+
category: generation
|
|
28
|
+
reads: [dsl-source]
|
|
29
|
+
writes: [dsl-generated-output]
|
|
30
|
+
purpose: Template rendering (prompt and document generation)
|
|
31
|
+
- command: "npx agent-contracts render -c agent-contracts.config.yaml --check"
|
|
32
|
+
category: verification
|
|
33
|
+
reads: [dsl-source, dsl-generated-output]
|
|
34
|
+
writes: []
|
|
35
|
+
purpose: Drift detection (source vs generated output)
|
|
36
|
+
- command: "npx agent-contracts score"
|
|
37
|
+
category: verification
|
|
38
|
+
reads: [dsl-source]
|
|
39
|
+
writes: [dsl-score-report]
|
|
40
|
+
purpose: DSL completeness score calculation (7 dimensions)
|
|
41
|
+
- command: "npx agent-contracts check -c agent-contracts.config.yaml"
|
|
42
|
+
category: verification
|
|
43
|
+
reads: [dsl-source]
|
|
44
|
+
writes: []
|
|
45
|
+
purpose: Pipeline — resolve → validate → lint → render --check
|
|
46
|
+
- command: "npx agent-contracts generate guardrails"
|
|
47
|
+
category: generation
|
|
48
|
+
reads: [dsl-source]
|
|
49
|
+
writes: [dsl-generated-output]
|
|
50
|
+
purpose: Generate guardrail runtime artifacts
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
dsl-schema-validation:
|
|
2
|
+
target_artifact: dsl-source
|
|
3
|
+
kind: schema
|
|
4
|
+
executor_type: tool
|
|
5
|
+
executor: agent-contracts-cli
|
|
6
|
+
blocking: true
|
|
7
|
+
x-description: >-
|
|
8
|
+
DSL schema validation via agent-contracts validate command.
|
|
9
|
+
Performs type checks on all entities, verifies required fields,
|
|
10
|
+
and checks cross-reference integrity.
|
|
11
|
+
|
|
12
|
+
dsl-lint-validation:
|
|
13
|
+
target_artifact: dsl-source
|
|
14
|
+
kind: semantic
|
|
15
|
+
executor_type: tool
|
|
16
|
+
executor: agent-contracts-cli
|
|
17
|
+
blocking: false
|
|
18
|
+
x-description: >-
|
|
19
|
+
Semantic validation via agent-contracts lint command.
|
|
20
|
+
Checks naming conventions, unused entities, circular references,
|
|
21
|
+
and other design quality aspects.
|
|
22
|
+
|
|
23
|
+
dsl-score-validation:
|
|
24
|
+
target_artifact: dsl-source
|
|
25
|
+
kind: semantic
|
|
26
|
+
executor_type: tool
|
|
27
|
+
executor: agent-contracts-cli
|
|
28
|
+
blocking: false
|
|
29
|
+
x-description: >-
|
|
30
|
+
Completeness evaluation via agent-contracts score command.
|
|
31
|
+
Scores across 7 dimensions: artifact validation coverage,
|
|
32
|
+
task validation coverage, guardrail policy coverage,
|
|
33
|
+
workflow validation integration, schema completeness,
|
|
34
|
+
cross-reference bidirectionality, guardrail scope resolution.
|
|
35
|
+
|
|
36
|
+
dsl-completeness-audit:
|
|
37
|
+
target_artifact: dsl-generated-output
|
|
38
|
+
kind: semantic
|
|
39
|
+
executor_type: agent
|
|
40
|
+
executor: dsl-auditor
|
|
41
|
+
blocking: false
|
|
42
|
+
produces_evidence: dsl-audit-report
|
|
43
|
+
x-description: >-
|
|
44
|
+
19-dimension cross-check audit of DSL definitions against generated
|
|
45
|
+
prompts. Verifies that all items defined in the DSL are correctly
|
|
46
|
+
reflected in generated output.
|
|
47
|
+
|
|
48
|
+
dsl-score-report-validation:
|
|
49
|
+
target_artifact: dsl-score-report
|
|
50
|
+
kind: semantic
|
|
51
|
+
executor_type: tool
|
|
52
|
+
executor: agent-contracts-cli
|
|
53
|
+
blocking: false
|
|
54
|
+
x-description: >-
|
|
55
|
+
Validates that dsl-score-report has been produced and contains
|
|
56
|
+
a valid score across all 7 dimensions.
|
|
57
|
+
|
|
58
|
+
dsl-audit-report-validation:
|
|
59
|
+
target_artifact: dsl-audit-report
|
|
60
|
+
kind: semantic
|
|
61
|
+
executor_type: agent
|
|
62
|
+
executor: dsl-auditor
|
|
63
|
+
blocking: false
|
|
64
|
+
x-description: >-
|
|
65
|
+
Validates that dsl-audit-report contains findings classified
|
|
66
|
+
as PASS/MISS/PARTIAL for all inspected dimensions.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
dsl-update:
|
|
2
|
+
description: >-
|
|
3
|
+
DSL Update — create and update agent-contracts DSL definitions and
|
|
4
|
+
bindings, verify quality via validate / lint / render / score.
|
|
5
|
+
Executed by DSL Designer.
|
|
6
|
+
entry_conditions:
|
|
7
|
+
- A DSL definition change request exists
|
|
8
|
+
trigger: >-
|
|
9
|
+
Execute when new DSL definitions need to be created, existing definitions
|
|
10
|
+
need updating, or bindings need to be added or modified.
|
|
11
|
+
steps:
|
|
12
|
+
- type: delegate
|
|
13
|
+
task: update-dsl-definitions
|
|
14
|
+
from_agent: dsl-designer
|
|
15
|
+
description: >-
|
|
16
|
+
DSL Designer creates or updates DSL definitions and verifies
|
|
17
|
+
via validate / lint.
|
|
18
|
+
- type: gate
|
|
19
|
+
gate_kind: dsl-task-result
|
|
20
|
+
description: >-
|
|
21
|
+
Block if validation_result or lint_result did not pass in
|
|
22
|
+
update-dsl-definitions.
|
|
23
|
+
- type: delegate
|
|
24
|
+
task: update-dsl-binding
|
|
25
|
+
from_agent: dsl-designer
|
|
26
|
+
description: >-
|
|
27
|
+
DSL Designer adds or updates bindings and verifies via generate.
|
|
28
|
+
- type: gate
|
|
29
|
+
gate_kind: dsl-task-result
|
|
30
|
+
description: >-
|
|
31
|
+
Block if generate_result is not 'pass' in update-dsl-binding.
|
|
32
|
+
Prevents render-dsl-outputs from executing against invalid bindings.
|
|
33
|
+
- type: delegate
|
|
34
|
+
task: render-dsl-outputs
|
|
35
|
+
from_agent: dsl-designer
|
|
36
|
+
description: >-
|
|
37
|
+
DSL Designer renders prompts and documents and checks for drift.
|
|
38
|
+
- type: gate
|
|
39
|
+
gate_kind: dsl-task-result
|
|
40
|
+
description: >-
|
|
41
|
+
Block if render_result is not 'pass' or drift_detected is true
|
|
42
|
+
in render-dsl-outputs result.
|
|
43
|
+
- type: delegate
|
|
44
|
+
task: check-dsl-score
|
|
45
|
+
from_agent: dsl-designer
|
|
46
|
+
description: >-
|
|
47
|
+
DSL Designer checks completeness score and identifies improvement areas.
|
|
48
|
+
|
|
49
|
+
dsl-audit:
|
|
50
|
+
description: >-
|
|
51
|
+
DSL Audit — audit completeness of DSL definitions against generated
|
|
52
|
+
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).
|
|
55
|
+
entry_conditions:
|
|
56
|
+
- DSL definition rendering is complete
|
|
57
|
+
trigger: >-
|
|
58
|
+
Execute when DSL completeness audit is needed. Typically run as a
|
|
59
|
+
quality check after DSL updates.
|
|
60
|
+
steps:
|
|
61
|
+
- type: delegate
|
|
62
|
+
task: audit-dsl-completeness
|
|
63
|
+
from_agent: dsl-auditor
|
|
64
|
+
description: >-
|
|
65
|
+
DSL Auditor executes 19-dimension cross-check and produces
|
|
66
|
+
audit report with improvement recommendations.
|
|
67
|
+
- type: gate
|
|
68
|
+
gate_kind: dsl-audit-result
|
|
69
|
+
description: >-
|
|
70
|
+
Block if audit-dsl-completeness detected 3 or more
|
|
71
|
+
critical-level gaps (triggers stop_and_report escalation).
|
|
72
|
+
- type: delegate
|
|
73
|
+
task: audit-semantic-design
|
|
74
|
+
from_agent: dsl-auditor
|
|
75
|
+
description: >-
|
|
76
|
+
DSL Auditor reviews DSL design for semantic coherence —
|
|
77
|
+
role overlap, scope breadth, gate placement, guardrail
|
|
78
|
+
enforcement paths.
|
|
79
|
+
- type: delegate
|
|
80
|
+
task: audit-generated-prompts
|
|
81
|
+
from_agent: dsl-auditor
|
|
82
|
+
description: >-
|
|
83
|
+
DSL Auditor compares generated prompts against DSL intent —
|
|
84
|
+
detects missing requirements, hallucinated permissions,
|
|
85
|
+
ambiguous instructions.
|
|
86
|
+
- type: gate
|
|
87
|
+
gate_kind: dsl-audit-result
|
|
88
|
+
description: >-
|
|
89
|
+
Terminal gate — block if audit-generated-prompts detected
|
|
90
|
+
hallucinated permissions (enforces dsl-no-hallucinated-permissions
|
|
91
|
+
guardrail at workflow level via stop_and_report escalation).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-contracts",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.5",
|
|
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",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
19
|
+
"dsl_base",
|
|
19
20
|
"cli-contract.yaml",
|
|
20
21
|
"docs/cli-reference.md",
|
|
21
22
|
"README.md",
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"@openai/agents": "^0.11.1",
|
|
77
78
|
"@types/node": "^25.6.0",
|
|
78
79
|
"agent-contracts-runtime": "^0.12.0",
|
|
79
|
-
"cli-contracts": "^0.2
|
|
80
|
+
"cli-contracts": "^0.5.2",
|
|
80
81
|
"eslint": "^10.2.0",
|
|
81
82
|
"globals": "^17.5.0",
|
|
82
83
|
"prettier": "^3.8.2",
|