-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathCONTROL_MATRIX.schema.json
More file actions
139 lines (139 loc) · 5.62 KB
/
Copy pathCONTROL_MATRIX.schema.json
File metadata and controls
139 lines (139 loc) · 5.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://agile-v.org/schemas/control-matrix/1.0.0",
"title": "Agile-V Control Matrix",
"description": "Schema for .agile-v/CONTROL_MATRIX.yaml. Semantic checks (allowed/forbidden tool overlap, unresolved TBD owners) must be enforced by consuming runtime or test script.",
"type": "object",
"required": ["version", "default_fail_mode", "controls"],
"properties": {
"version": {"type": "string"},
"effective_from": {"type": "string"},
"default_fail_mode": {"type": "string", "enum": ["closed", "open"]},
"default_log_storage": {"type": "string"},
"default_retention_days": {"type": "integer", "minimum": 1},
"controls": {
"type": "array",
"minItems": 1,
"items": {"$ref": "#/$defs/control"}
}
},
"$defs": {
"control": {
"type": "object",
"required": [
"id", "status", "scope", "applies_to", "minimum_risk_level",
"data_class", "tools", "model", "logs", "max_permissions",
"human_gates", "tests", "cost_limit", "rollback", "owner", "review"
],
"properties": {
"id": {"type": "string", "pattern": "^cm-[a-z0-9][a-z0-9-]*$"},
"status": {"type": "string", "enum": ["draft", "active", "deprecated", "disabled"]},
"description": {"type": "string"},
"scope": {"type": "string", "enum": ["global", "task", "agent", "skill", "tool", "repo"]},
"minimum_risk_level": {"type": "string", "enum": ["L0", "L1", "L2", "L3", "L4"]},
"applies_to": {"type": "object"},
"data_class": {"$ref": "#/$defs/dataClass"},
"tools": {"$ref": "#/$defs/tools"},
"model": {"$ref": "#/$defs/model"},
"logs": {"$ref": "#/$defs/logs"},
"max_permissions": {"type": "object"},
"human_gates": {"$ref": "#/$defs/humanGates"},
"tests": {"type": "object"},
"cost_limit": {"$ref": "#/$defs/costLimit"},
"rollback": {"type": "object"},
"owner": {"$ref": "#/$defs/owner"},
"review": {"type": "object"}
}
},
"dataClass": {
"type": "object",
"required": ["allowed", "forbidden", "default_if_unknown", "unknown_action", "redaction_required"],
"properties": {
"allowed": {"type": "array", "items": {"type": "string"}},
"forbidden": {"type": "array", "items": {"type": "string"}},
"default_if_unknown": {"type": "string"},
"unknown_action": {"type": "string", "enum": ["deny", "allow", "require_human_gate"]},
"redaction_required": {"type": "boolean"}
}
},
"tools": {
"type": "object",
"required": ["allowed", "forbidden", "requires_gate"],
"properties": {
"allowed": {"type": "array", "items": {"type": "string"}},
"forbidden": {"type": "array", "items": {"type": "string"}},
"requires_gate": {"type": "array", "items": {"type": "string"}}
}
},
"model": {
"type": "object",
"required": ["vendor", "model_name", "allow_external_vendor", "record_model_in_evidence"],
"properties": {
"vendor": {"type": "string"},
"model_name": {"type": "string"},
"fallback_model": {"type": ["string", "null"]},
"allow_external_vendor": {"type": "boolean"},
"require_vendor_review_for_data_classes": {"type": "array", "items": {"type": "string"}},
"record_model_in_evidence": {"type": "boolean"}
}
},
"logs": {
"type": "object",
"required": ["storage_location", "include_tool_calls", "redact_personal_data", "retention_days"],
"properties": {
"storage_location": {"type": "string"},
"tool_log_location": {"type": "string"},
"include_prompt": {"type": "boolean"},
"include_response": {"type": "boolean"},
"include_tool_calls": {"type": "boolean"},
"include_decision_rationale": {"type": "boolean"},
"redact_personal_data": {"type": "boolean"},
"retention_days": {"type": "integer", "minimum": 1}
}
},
"humanGates": {
"type": "object",
"required": ["required_before", "checkpoint_file", "approvals_file", "require_resume_token"],
"properties": {
"required_before": {
"type": "array",
"items": {
"type": "object",
"required": ["action", "gate", "approver_role"],
"properties": {
"action": {"type": "string"},
"gate": {"type": "string"},
"approver_role": {"type": "string"}
}
}
},
"checkpoint_file": {"type": "string"},
"approvals_file": {"type": "string"},
"require_resume_token": {"type": "boolean"}
}
},
"costLimit": {
"type": "object",
"required": ["currency", "max_run_cost", "max_daily_cost", "action_on_limit", "cost_log"],
"properties": {
"currency": {"type": "string"},
"max_run_cost": {"type": "number", "minimum": 0},
"max_daily_cost": {"type": "number", "minimum": 0},
"max_monthly_cost": {"type": "number", "minimum": 0},
"action_on_limit": {"type": "string", "enum": ["stop", "warn", "stop_and_request_approval"]},
"cost_log": {"type": "string"}
}
},
"owner": {
"type": "object",
"required": ["business_owner", "technical_owner", "security_owner", "reviewer"],
"properties": {
"business_owner": {"type": "string", "minLength": 1},
"technical_owner": {"type": "string", "minLength": 1},
"security_owner": {"type": "string", "minLength": 1},
"reviewer": {"type": "string", "minLength": 1},
"backup_owner": {"type": "string"}
}
}
}
}