11from __future__ import annotations
22
3- """Maps Airlock Protocol features to RBI FREE-AI Framework sutras and recommendations ."""
3+ """Maps Airlock Protocol features to regulatory compliance framework principles ."""
44
55import logging
66from typing import Any
1010
1111logger = logging .getLogger (__name__ )
1212
13- # RBI FREE-AI Framework : 7 Sutras
14- SUTRAS : dict [str , str ] = {
15- "sutra_1 " : "Governance & Oversight" ,
16- "sutra_2 " : "Risk Management" ,
17- "sutra_3 " : "Data Governance" ,
18- "sutra_4 " : "Model Development & Validation" ,
19- "sutra_5 " : "Fairness & Bias" ,
20- "sutra_6 " : "Transparency & Explainability" ,
21- "sutra_7 " : "Accountability & Audit" ,
13+ # Compliance framework : 7 core principles
14+ PRINCIPLES : dict [str , str ] = {
15+ "principle_1 " : "Governance & Oversight" ,
16+ "principle_2 " : "Risk Management" ,
17+ "principle_3 " : "Data Governance" ,
18+ "principle_4 " : "Model Development & Validation" ,
19+ "principle_5 " : "Fairness & Bias" ,
20+ "principle_6 " : "Transparency & Explainability" ,
21+ "principle_7 " : "Accountability & Audit" ,
2222}
2323
24- # Selected RBI FREE-AI recommendations mapped to Airlock features
24+ # Regulatory recommendations mapped to Airlock features
2525RECOMMENDATION_MAP : dict [str , dict [str , str ]] = {
26- "rec_14 " : {
26+ "rec_01 " : {
2727 "title" : "AI Model Inventory" ,
2828 "airlock_feature" : "agent_inventory" ,
29- "sutra " : "sutra_1 " ,
29+ "principle " : "principle_1 " ,
3030 },
31- "rec_15 " : {
31+ "rec_02 " : {
3232 "title" : "Risk Classification" ,
3333 "airlock_feature" : "risk_classifier" ,
34- "sutra " : "sutra_2 " ,
34+ "principle " : "principle_2 " ,
3535 },
36- "rec_16 " : {
36+ "rec_03 " : {
3737 "title" : "Incident Reporting" ,
3838 "airlock_feature" : "incident_store" ,
39- "sutra " : "sutra_2 " ,
39+ "principle " : "principle_2 " ,
4040 },
41- "rec_17 " : {
41+ "rec_04 " : {
4242 "title" : "Audit Trail" ,
4343 "airlock_feature" : "audit_trail" ,
44- "sutra " : "sutra_7 " ,
44+ "principle " : "principle_7 " ,
4545 },
46- "rec_18 " : {
46+ "rec_05 " : {
4747 "title" : "Bias Detection" ,
4848 "airlock_feature" : "bias_detector" ,
49- "sutra " : "sutra_5 " ,
49+ "principle " : "principle_5 " ,
5050 },
51- "rec_19 " : {
51+ "rec_06 " : {
5252 "title" : "Trust Scoring Transparency" ,
5353 "airlock_feature" : "trust_scoring" ,
54- "sutra " : "sutra_6 " ,
54+ "principle " : "principle_6 " ,
5555 },
56- "rec_20 " : {
56+ "rec_07 " : {
5757 "title" : "Identity Verification" ,
5858 "airlock_feature" : "did_verification" ,
59- "sutra " : "sutra_1 " ,
59+ "principle " : "principle_1 " ,
6060 },
61- "rec_21 " : {
61+ "rec_08 " : {
6262 "title" : "Capability Assessment" ,
6363 "airlock_feature" : "vc_capability" ,
64- "sutra " : "sutra_4 " ,
64+ "principle " : "principle_4 " ,
6565 },
66- "rec_22 " : {
66+ "rec_09 " : {
6767 "title" : "Data Privacy Controls" ,
6868 "airlock_feature" : "privacy_mode" ,
69- "sutra " : "sutra_3 " ,
69+ "principle " : "principle_3 " ,
7070 },
71- "rec_23 " : {
71+ "rec_10 " : {
7272 "title" : "Compliance Reporting" ,
7373 "airlock_feature" : "compliance_reports" ,
74- "sutra " : "sutra_7 " ,
74+ "principle " : "principle_7 " ,
7575 },
7676}
7777
7878
79- class FreeAIMapper :
80- """Maps Airlock compliance status to RBI FREE-AI framework."""
79+ class RegulatoryMapper :
80+ """Maps Airlock compliance status to regulatory framework principles ."""
8181
8282 def map_compliance_status (
8383 self ,
8484 inventory : AgentInventory ,
8585 incident_store : IncidentStore ,
8686 ) -> dict [str , Any ]:
87- """Map current compliance state to FREE-AI sutras and recommendations."""
87+ """Map current compliance state to framework principles and recommendations."""
8888 agents = inventory .list_all ()
8989 incidents = incident_store .list_all ()
9090
91- sutra_status : dict [str , dict [str , Any ]] = {}
92- for sutra_id , sutra_name in SUTRAS .items ():
91+ principle_status : dict [str , dict [str , Any ]] = {}
92+ for principle_id , principle_name in PRINCIPLES .items ():
9393 mapped_recs = [
9494 rec_id
9595 for rec_id , rec_data in RECOMMENDATION_MAP .items ()
96- if rec_data ["sutra " ] == sutra_id
96+ if rec_data ["principle " ] == principle_id
9797 ]
98- sutra_status [ sutra_id ] = {
99- "name" : sutra_name ,
98+ principle_status [ principle_id ] = {
99+ "name" : principle_name ,
100100 "recommendation_count" : len (mapped_recs ),
101101 "recommendations" : mapped_recs ,
102102 "status" : "active" if agents else "pending" ,
@@ -111,8 +111,8 @@ def map_compliance_status(
111111 )
112112
113113 return {
114- "framework" : "RBI FREE-AI " ,
115- "sutras " : sutra_status ,
114+ "framework" : "airlock-compliance " ,
115+ "principles " : principle_status ,
116116 "recommendations" : recommendation_status ,
117117 "total_agents_tracked" : len (agents ),
118118 "total_incidents" : len (incidents ),
@@ -130,7 +130,7 @@ def get_recommendation_status(
130130 return {"error" : f"Unknown recommendation: { rec_id } " }
131131
132132 feature = rec_data ["airlock_feature" ]
133- implemented = True # All mapped features exist in the codebase
133+ implemented = True
134134 active = False
135135
136136 if feature == "agent_inventory" and inventory is not None :
@@ -147,12 +147,12 @@ def get_recommendation_status(
147147 "audit_trail" ,
148148 "compliance_reports" ,
149149 ):
150- active = True # Core features are always active
150+ active = True
151151
152152 return {
153153 "rec_id" : rec_id ,
154154 "title" : rec_data ["title" ],
155- "sutra " : rec_data ["sutra " ],
155+ "principle " : rec_data ["principle " ],
156156 "airlock_feature" : feature ,
157157 "implemented" : implemented ,
158158 "active" : active ,
0 commit comments