If you have deployed a large language model in production, even just as a personal coding assistant, you have hit the wall.
The model gives you a great answer. Confident. Well-structured. You paste it into a Slack thread or a PR review, and someone asks: "How did it arrive at that conclusion?"
You do not know. The model does not know either. And there is no audit trail.
I have been in IT for over two decades, and I have watched the AI adoption curve accelerate faster than anything I have seen. But here is what keeps me up at night: we are deploying systems that cannot explain themselves, cannot stay consistent across sessions, and have no governance layer.
So I built one. In the open.
The Problem Is Not Intelligence. It Is Drift. Every LLM session starts fresh. No memory of the last conversation. No enforcement of rules you set yesterday. No record of what it was told to never do. That works fine for a chatbot. It is a liability for anything serious.
I needed a system where:
- Compliance rules persist across sessions -- indefinitely
- Every decision has an auditable trail
- Alignment constraints do not degrade over time
- The governance layer is model-agnostic (I switch models constantly)
The market is full of "memory" solutions. But they are all recall -- remembering facts, preferences, or conversation history. That is not governance. That is a long context window.
What I needed was alignment memory -- the ability to enforce rules, track compliance scores, and prevent ethical drift. Session after session. Model after model.
What SAFi Does Differently
SAFi (Self Alignment Framework Interface) is an open-source governance layer that sits between you and any LLM.
Here is the architecture in plain terms:
1. A Compliance Engine
Rules are defined as structured constraints -- not vague system prompts. Each constraint has a weight, a scoring mechanism, and an audit log. You can see exactly which rules were triggered on every response.
2. Alignment Memory
Unlike "remember my name" memory, SAFi stores compliance state across sessions. If you told the system yesterday to never generate financial advice, that rule is still enforced today. No drift. No resets.
3. Model-Agnostic Interface
Swap out GPT-5 for Llama 3, Claude, or a local Mistral instance. The governance layer stays the same. Your rules, your audit trail, your compliance scores -- all independent of the underlying model.
4. Open Source
No vendor lock-in. No black-box compliance. Every line of the framework is on GitHub, auditable by anyone.
Who This Is For
- Developers running LLMs in production who need guardrails that actually stick
- IT Directors (like me) who are responsible for AI governance and cannot sleep at night wondering what the model just told a customer
- Open source contributors who want to shape the future of AI alignment
- Anyone who is tired of re-prompting the same constraints every session
A Real Use Case
I am not a compliance officer. I am not a philosopher. I am an IT Director who codes on weekends and realized the tools for AI governance did not exist.
So I built SAFi as a side project. It is now the most honest code I have written -- because every line is about making AI explainable, auditable, and trustworthy.
Try It
The repo is live at github.com/jnamaya/SAFi. Issues, PRs, and honest feedback are all welcome.
I am not selling anything. I am not building a startup. I am building the governance layer I wish already existed.
If you have hit the same wall -- models giving answers you cannot audit, rules that do not persist, alignment that drifts -- fork the repo, open an issue, or just tell me I am building the wrong thing.
Your feedback shapes the roadmap.
Top comments (0)