Represent a lifecycle event
Each event describes a synthetic identity, its lifecycle action, its role and permissions. I used CSV for event data and YAML or text for governance policies. The data generator included eight deliberately seeded mover scenarios with both transaction initiation and approval permissions.
I separated the generator, policy retriever, orchestrator and interface so I could change or test each part on its own. The orchestrator brings the event, retrieved policy and rule result into the review workflow.
Retrieve policy and check the conflict
TF-IDF ranks policy text by how strongly its terms match the event. I used cosine similarity to rank the excerpts and returned the three highest-ranked results. The approach suited the permission names and policy terms in the lab. Different wording or synonyms could still lead it to miss relevant text.
The separation-of-duties check compares the requested permission set with the combinations defined in policy. If all permissions in a forbidden combination are present, it flags the conflict and can give the reviewer the reason. This result is available independently of what the model recommends.
Record the decision
After redacting sensitive fields locally, the app sends relevant context to the model for a suggested action and rationale. The reviewer sees the result and records their decision. The audit CSV stores the record with an HMAC-SHA256 value so a later check can detect changes to covered fields, provided the verification key is protected.