Hacker
Pravin G
@pravin98651
Projects
ReleaseGaurd-AI
Flagsmith Experimentation HackathonNov 2026
I built ReleaseGuard AI, an autonomous release governance control plane that unifies GitHub Pull Requests, Flagsmith Feature Flags & Experiments, deterministic Bayesian decisioning, and human-in-the-loop production safety in one fail-closed workflow. The problem it solves: Modern engineering teams ship fast, but production releases still break at the seams between disconnected tools: Risky PR changes slip into main without feature-flag protection. Wrapping code in flags, configuring A/B tests, and cleaning up stale flags afterward are manual, error-prone tasks. Teams want AI speed for release engineering, but letting an LLM directly mutate production feature flags or merge PRs is unsafe. ReleaseGuard AI solves this by separating AI reasoning (Gemini proposes actions with Automatic Function Calling disabled) from deterministic math and policy enforcement (PolicyEngine), with Flagsmith acting as both the feature/experiment system of record and the fail-closed kill switch (releaseguard_agent_enabled) that governs the AI agent itself. Who would use it: Software & Release Engineers / DevOps / Platform Teams who want AI-assisted PR risk analysis, automated Flagsmith flag wrapping, safe A/B experiment evaluation, and stale-flag cleanup without giving an AI agent unchecked production access. Product & Growth Engineering Teams running Flagsmith feature rollouts and experiments who need automated sample-size and error-rate guardrails before promoting a winning variant. How it works: AI PR Intelligence: A LangGraph supervisor (ReleaseGuardSupervisor) sends GitHub PR diffs to Gemini (AFC = Disabled) to score 7-dimension release risk, recommend Flagsmith flags, and validate patches (PatchValidator) before opening Draft PRs only (draft=True, never auto-merging to main). Unified Flagsmith Gateway: Connects to Flagsmith across REST (Management v1/v2 + Edge API, default), Flagsmith CLI v2 (v2.0.0) (read-only inspection & identity evaluation), and the Official Flagsmith MCP Server (54 tools with per-agent allowlists and PolicyEngine approval gates). Deterministic Bayesian & Guardrail Gate: A pure-Python Beta-Binomial engine (50,000 Monte Carlo draws, zero LLM math) evaluates experiment cohorts alongside Flagsmith native /results/, blocking promotion (409) if exposures are under 100 per arm or if error guardrails (payment_failed / checkout_abandoned) breach. Category C Human Approval & Kill Switch: Production mutations and winner promotions require single-use, SHA-256 hash-bound approval from an independent reviewer (requested_by_id != decided_by_id), live precondition drift checks (409), and a live re-check of Flagsmith's releaseguard_agent_enabled kill switch (503 AGENT_HALTED if disabled or unreachable). Verified Readback & Flag Cleanup: Every executed mutation is verified via live Flagsmith Management + Edge readback (verify_live_state()), written back to Flagsmith tags/descriptions, and followed by an AST/TSX Cleanup Draft PR that blocks flag archival (409) until zero code references remain.