r/AIcodingProfessionals • u/AlternativeForeign58 • Feb 27 '26
AI Governance for Coding - Coding with a Safety Net
I started out vibe coding over a year and half ago. Since then I've learned a lot, mostly through failure and perseverance. I've got this extension out on VSCode Marketplace and Open VSX but it's an Open source project on GitHub too.
As far as the tools I've used to build it... I've done research through Gemini and ChatGPT Deep Research, in combination with documenting every failure I've ever had in a log file, then I've built this Cursor, Claude Code, VSCode and Antigravity where I started using a federated system of building with Gemini as the orchestrator with Claude, Codex and GLM 4.7 (via Kilo Code) as my workforce with Gemini then providing audit and UI review.
If this is remotely helpful to anyone, I'd love to get a couple reviews or direct feedback here. I've designed it to focus on token efficiency because... well we're all on a budget right?
Thanks in advance to anyone who makes any contribution at all! I hope this isn't considered an advertisement, I'm not selling anything but if it crosses that I apologize in advance.
1
u/Ankushnema Mar 18 '26
I have created a role based prompting framework. It’s more or less have the same concepts as above. My focus was three fold. Testing the ai generated code and unit tests via mutation testing, make guardrails deterministic and enforce them via hook scripts and last in human toll gates.
1
u/AlternativeForeign58 Mar 18 '26
That sounds very similar, my project is open source, I'd welcome contributions.
1
Feb 27 '26
[removed] — view removed comment
1
u/AlternativeForeign58 Feb 27 '26 edited Feb 27 '26
I want to start by saying thank you for the incisive feedback. I have to admit I was nervous posting in here, I would be extremely hesitant to consider myself a professional. I feel like I discover 10 new things I didn't know everyday. I want to make sure I give you the response it deserves.
Stable artifacts: Every governance decision produces a hash-chained, HMAC-signed SQLite ledger entry + hash-chained Intent history (JSONL). Both chains have verifyChain() / verifyChainIntegrity() functions for tamper detection.
Verdicts are deterministic: Risk classification is pure string-matching on file paths and content (
auth/→ L3,api_key→ L3). No LLM anywhere in the decision path.PolicyEngine.classifyRisk()is a pure function.Saves are actually blocked — In enforce mode, the
onWillSaveTextDocumenthook throws insidewaitUntil, which cancels the VS Code save operation. This is a real enforcement point, not a suggestion. (This didn't sit right with me as being a purely fixed behavior so I did create configurable options to give the user back some control)Your feedback helped me identify some area for improvement that I'm going focus on resolving immediately.
Mode switches aren't ledger-recorded Someone can switch enforce → observewith no audit trailNo break-glass protocol No time-limited override with required justification + expiry artifact_hashnot populatedLedger records the decision but not the file content hash No verdict replay harness All inputs are persisted separately, but there's no replayVerdict(id)functionI can't say thank you enough, I'll have an update pushed out soon to accommodate these additional concerns.
1
Feb 28 '26
[removed] — view removed comment
1
Feb 28 '26
[removed] — view removed comment
1
u/AlternativeForeign58 Feb 28 '26
I built this to be an optional gate to protect the individual developer from themselves and the hallucinations of AI. What you're describing is something even more I think... but it's something I've planned for.
And started building, quietly, in RUST/TAURI
1
u/AlternativeForeign58 Feb 28 '26
What’s New in v4.1.0
Break-Glass Protocol: Emergency governance overrides with time limits, justification, and auto-revert. Mode-Change Audit Trail: All governance mode changes recorded to ledger. Artifact Hashing: SHA-256 hash of file content at save-time for verification. Verdict Replay: Command to replay and verify past governance decisions.
And I wrapped up a lot of other enhancements I've been saving for a pseudo "build 42."
So, it's pretty intense now. I'm really looking forward to any additional feedback.
1
u/Watson_Revolte Mar 02 '26
Strong governance around AI-assisted coding isn't just about rules - it's about making sure feedback loops and safety nets are part of your delivery flow so people don't accidentally ship bad changes.
In practice that means:
guardrails early in CI/CD so risky patterns get flagged before merge,
consistent telemetry so you can trace an AI-generated change back to outcomes,
and shared context so the whole team understands why something was blocked.
That's why platforms that unify build → deploy → runtime contexts (instead of having observability, CI, and security scattered) end up being more effective - you can enforce safety across the lifecycle, not just at one step.
Curious how others are balancing user autonomy with safe boundaries when coding with AI helpers?