Module: factory.core/extend.delegate
Type: Mixin (mixed into ObjData)
RACI is a responsibility assignment matrix used to clarify roles and ownership for every activity in a process. Each letter represents a level of involvement:
ObjRaci is a reusable mixin that provides RACI matrix generation, caching, and HTML rendering for any compute module that inherits from ObjData. Matrices are generated via AI and cached in configurable database columns.
RACI columns (RaciSimulation, RaciProduction, RaciOutcome) are present on the following definition tables:
| Table | Module | Key Column |
|---|---|---|
def_decision_tree |
ObjDecisionSwitch | DecisionName |
def_scorecard_context |
ObjScorecard | Scorecard |
def_decision_ruleset |
ObjDecisionRuleset | RulesetName |
def_decision_segment |
ObjDecisionSegmentation | SegmentName |
def_workflow |
ObjWorkflow | WorkflowName |
def_calculation |
ObjCalculation | CalculationGroup |
def_decision_matrix |
ObjDecisionMatrix | MatrixName |
def_feature |
ObjFeatureStore | FeatureCode |
The four default activities map to lifecycle stages:
Any ObjData subclass automatically has access to RACI methods:
raci = self.get_raci(
table="def_decision_tree",
key_column="DecisionName",
key_value="credit_scoring",
activities=["Simulation", "Production",
"Outcome Monitoring"],
context="Credit scoring decision tree",
)
html = self.build_raci_html(raci)
get_raci(table, key_column, key_value, ...)Loads a cached RACI matrix from the database or generates one via AI. Returns a dict mapping activity names to lists of 4 role strings [R, A, C, I].
Parameters:
table — Source table with RACI columnskey_column — Column to filter onkey_value — Value to matchactivities — Activity labels (default: Simulation, Production, Outcome Monitoring, Development)columns — DB column names storing RACI data (default: RaciSimulation, RaciProduction, RaciOutcome, RaciDevelopment)context — Description passed to AI for generationforce_refresh — Bypass cache and regeneratebuild_raci_html(raci, palette=None)Renders a RACI dict as an HTML table using templates from ObjRaci.yaml.
RACI data is stored as pipe-delimited strings in database columns:
RaciSimulation: "Data Team|CTO|Risk|Operations"
RaciProduction: "DevOps|CTO|Data Team|Support"
RaciOutcome: "Risk|CTO|Legal|Operations"
Each position maps to R|A|C|I.
Templates are defined in ObjRaci.yaml:
raci_header — section headingraci_legend — R/A/C/I keyraci_row — single activity row with {activity}, {responsible}, {accountable}, {consulted}, {informed} placeholdersModule-level RACI is automatically supplemented by package-level RACI from def_package. For each activity, any role slot that is empty ("—") is filled from the package default.
Package RACI: R=DevOps A=CTO C=Legal I=Ops
Module RACI: R=Data A=— C=Risk I=—
Merged result: R=Data A=CTO C=Risk I=Ops
This means:
get_raci() is called on def_package itself, no supplementation occurs (avoids recursion)When no cached RACI exists, the mixin uses ObjAI to generate one from:
get_contact_list())The AI response is parsed as JSON and cached to the database columns for subsequent use.