<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Salman Ahmad</title>
    <description>The latest articles on DEV Community by Salman Ahmad (@ahmmikun).</description>
    <link>https://dev.to/ahmmikun</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3676517%2Fbc9db74a-6ef2-4826-9f42-7119818aca52.jpeg</url>
      <title>DEV Community: Salman Ahmad</title>
      <link>https://dev.to/ahmmikun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmmikun"/>
    <language>en</language>
    <item>
      <title>RepoSage: Local-First GitHub Audits with Open-Weight Gemma 4 &amp; Anti-Hallucination Gates</title>
      <dc:creator>Salman Ahmad</dc:creator>
      <pubDate>Tue, 20 Oct 2026 20:25:55 +0000</pubDate>
      <link>https://dev.to/ahmmikun/reposage-local-first-github-audits-with-open-weight-gemma-4-anti-hallucination-gates-25fk</link>
      <guid>https://dev.to/ahmmikun/reposage-local-first-github-audits-with-open-weight-gemma-4-anti-hallucination-gates-25fk</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Most software developers genuinely want thorough code reviews, security governance, and CI/CD audits. But in practice, comprehensive repository hygiene is one of the most procrastinated, dreaded tasks in engineering. We open a repository, dread the prospect of manually inspecting dozens of YAML workflow files, auditing transitive dependencies, verifying license files, checking branch protection settings, and writing out tickets. So we put it off until an incident occurs.&lt;/p&gt;

&lt;p&gt;Existing AI linters and code review bots promise to automate this, but introduce two severe dealbreakers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Credential Dilemma:&lt;/strong&gt; They ask you to paste a sensitive Personal Access Token (PAT) into a web app or &lt;code&gt;.env&lt;/code&gt; file, creating an unnecessary attack surface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Hallucination Trap:&lt;/strong&gt; General-purpose LLMs routinely invent phantom files, cite workflows that don't exist, or claim a security policy is missing when it sits right in &lt;code&gt;.github/SECURITY.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy Exposure:&lt;/strong&gt; Auditing proprietary code with closed-source cloud APIs forces organizations to transmit intellectual property across the public internet.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the spirit of &lt;strong&gt;International Sloth Day&lt;/strong&gt; and this week's &lt;strong&gt;"Slow and Steady"&lt;/strong&gt; theme, I built &lt;strong&gt;RepoSage&lt;/strong&gt; — a tool that channels your inner sloth by doing the tedious, heavy-lifting repository auditing for you, while maintaining rigorous, deterministic standards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RepoSage&lt;/strong&gt; is a local-first, evidence-grounded GitHub repository auditor powered by &lt;strong&gt;open-weight Gemma 4 models&lt;/strong&gt;. It connects natively to your machine's authenticated &lt;strong&gt;GitHub CLI (&lt;code&gt;gh&lt;/code&gt;)&lt;/strong&gt; session with zero token pasting, computes an instant deterministic 0–100 Health Score across 6 dimensions before calling any AI, cross-verifies every AI claim against your actual Git tree to quarantine hallucinations, and converts verified findings into real GitHub Issues or turnkey AI fix prompts in a single click.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔑 &lt;strong&gt;Zero-PAT Friction:&lt;/strong&gt; Bridges directly to your local &lt;code&gt;gh auth token&lt;/code&gt; in-memory. Zero tokens saved, logged, or sent to the browser.&lt;/li&gt;
&lt;li&gt;📐 &lt;strong&gt;Deterministic Health Baseline:&lt;/strong&gt; Computes a reproducible 0–100 Health Score across 22 rules (CI/CD security, test coverage, dependency hygiene, documentation, community health, and velocity) completely offline before any AI runs.&lt;/li&gt;
&lt;li&gt;🧠 &lt;strong&gt;Dual-Runtime Open-Weight AI (Gemma 4):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Privacy Mode:&lt;/strong&gt; Runs &lt;code&gt;Gemma 4 E4B&lt;/code&gt; locally on Ollama (&lt;code&gt;/api/chat&lt;/code&gt; with structured JSON schema) for 100% air-gapped, zero-cloud confidentiality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosted Mode:&lt;/strong&gt; Runs &lt;code&gt;Gemma 4 26B&lt;/code&gt; (MoE) via Google AI Studio for deep architectural synthesis.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;🛡️ &lt;strong&gt;Anti-Hallucination Citation Verifier:&lt;/strong&gt; Every file path and check cited by the model is validated against the repository's recursive Git tree. Any hallucinated file or nonexistent check is immediately quarantined as &lt;code&gt;UNVERIFIED_PATH&lt;/code&gt; or &lt;code&gt;UNVERIFIED_CHECK&lt;/code&gt; and stripped from the action plan.&lt;/li&gt;
&lt;li&gt;⚖️ &lt;strong&gt;Fair Comparison Arena:&lt;/strong&gt; Generates a canonical SHA-256 hashed evidence manifest ensuring both local and hosted Gemma runtimes receive byte-identical evidence for benchmark comparisons.&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;1-Click GitHub Remediation:&lt;/strong&gt; Converts verified findings into pre-formatted, actionable GitHub Issues through the CLI bridge.&lt;/li&gt;
&lt;li&gt;🛠️ &lt;strong&gt;Turnkey AI Fix Prompts:&lt;/strong&gt; Generates structured prompts tailored for Claude Code, Cursor Composer (&lt;code&gt;@file&lt;/code&gt;), Devin, and Aider CLI (&lt;code&gt;/add&lt;/code&gt;) to remediate vulnerabilities and achieve a 100/100 score automatically.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Here is how RepoSage orchestrates an audit from evidence collection to remediation:&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    A[Local Developer Machine] --&amp;gt;|gh auth token| B[GitHub CLI Bridge]
    B --&amp;gt;|GraphQL &amp;amp; REST APIs| C[Evidence Collector]
    C --&amp;gt;|Recursive Git Tree &amp;amp; Configs| D[Deterministic Rule Engine]
    D --&amp;gt;|Instant 0-100 Score| E[Canonical Manifest Compiler]
    E --&amp;gt;|Secret Redaction &amp;amp; SHA-256 Hash| F{Gemma 4 Runtime}
    F --&amp;gt;|Local Mode: Ollama| G[Gemma 4 E4B]
    F --&amp;gt;|Hosted Mode: AI Studio| H[Gemma 4 26B MoE]
    G --&amp;gt; I[Structured JSON Output]
    H --&amp;gt; I
    I --&amp;gt; J[Anti-Hallucination Citation Verifier]
    J --&amp;gt;|Verified Citations| K[Interactive Audit Dashboard]
    J --&amp;gt;|Hallucinated Citations| L[Quarantine Telemetry]
    K --&amp;gt; M[1-Click GitHub Issue Creation]
    K --&amp;gt; N[Turnkey AI Agent Fix Prompts]&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  The User Flow
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Instant Session Detection:&lt;/strong&gt; Opening RepoSage at &lt;code&gt;http://localhost:3000&lt;/code&gt; immediately surfaces your public and private repositories using your authenticated &lt;code&gt;gh&lt;/code&gt; session. No login screens or PAT inputs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Scan:&lt;/strong&gt; Selecting a repository kicks off the audit. In less than 500ms, the deterministic engine scans workflow permissions, lockfile integrity, license metadata, and branch policies to set a baseline score.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming AI Reasoning:&lt;/strong&gt; Gemma 4 streams structured risk assessments and architectural remediation advice over Server-Sent Events (SSE).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Citation Validation:&lt;/strong&gt; The Citation Verifier inspects every claim. Notice how findings display a verified badge linked directly to the file in the repository.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remediation:&lt;/strong&gt; Click &lt;strong&gt;"Create GitHub Issue"&lt;/strong&gt; to file the issue, or &lt;strong&gt;"Copy Fix Prompt"&lt;/strong&gt; to hand the task over to an AI coding agent.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/ahmmikun" rel="noopener noreferrer"&gt;
        ahmmikun
      &lt;/a&gt; / &lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion" rel="noopener noreferrer"&gt;
        HacktoberFest-x-Fluxxion
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Official Open-Source AI Project for MLH Hacktoberfest Hack Day Lahore x Fluxxion 2026
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;RepoSage 🔎&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Local-first, evidence-grounded GitHub repository auditing powered by open-weight Gemma 4.&lt;/strong&gt;&lt;br&gt;
Official open-source AI submission for &lt;strong&gt;MLH Hacktoberfest Hack Day Lahore × Fluxxion 2026&lt;/strong&gt;, targeting the &lt;strong&gt;Best Open-Source AI Project&lt;/strong&gt; challenge.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://ai.google.dev/gemma/docs/core/model_card_4" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c297f6b3d3476c7da7aed22fc78ee950d163be85d35429a743aefa8e8869b5f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f64656c2d47656d6d612532303425323028417061636865253230322e30292d3432383546342e737667" alt="Gemma 4"&gt;&lt;/a&gt;
&lt;a href="https://nodejs.org/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f0ed0ebc06782d13bc5933f4ba7a37ab6e1cbfaaae769619a53fed1e5e92beeb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f64652e6a732d25453225383925413532302e31312d3333393933332e737667" alt="Node.js"&gt;&lt;/a&gt;
&lt;a href="https://events.mlh.com/events/15520-hacktoberfest-hack-day-lahore-x-fluxxion" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/359a78a6c36b079b424e81e8d4f42c736fee8b4bef8a291fd8048c5d55af7688/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4861636b746f626572666573742d323032362d6f72616e67652e737667" alt="Hacktoberfest 2026"&gt;&lt;/a&gt;
&lt;a href="https://www.mlh.com/events/hacktoberfest-hack-day-lahore-x-fluxxion/challenges/01a0d987-0c41-12ea-13ac-5b85755dc2f3" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/885ec7709b5d2312ec227f0130d6af1c242f842960d2ce78355edc01d08425bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4368616c6c656e67652d426573742532304f70656e2d2d536f75726365253230414925323050726f6a6563742d3030383046462e737667" alt="Challenge"&gt;&lt;/a&gt;
&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion/CONTRIBUTING.md" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/dd0b24c1e6776719edb2c273548a510d6490d8d25269a043dfabbd38419905da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667" alt="PRs Welcome"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-alert markdown-alert-note"&gt;
&lt;p class="markdown-alert-title"&gt;Note&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Project status: v1.0.0 implemented.&lt;/strong&gt; The full audit pipeline, API, and dashboard are in the repository. &lt;code&gt;npm ci&lt;/code&gt;, &lt;code&gt;npm run typecheck&lt;/code&gt;, and &lt;code&gt;npm run build&lt;/code&gt; pass on Node.js 24.22 with npm 11.19 (Windows). There is no automated test suite or CI workflow yet; see &lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#known-limitations" rel="noopener noreferrer"&gt;Known Limitations&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Table of Contents&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#overview" rel="noopener noreferrer"&gt;Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#hackathon-context" rel="noopener noreferrer"&gt;Hackathon Context&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#problem--solution" rel="noopener noreferrer"&gt;Problem &amp;amp; Solution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#what-makes-reposage-different" rel="noopener noreferrer"&gt;What Makes RepoSage Different&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#open-weight-ai--supported-models" rel="noopener noreferrer"&gt;Open-Weight AI &amp;amp; Supported Models&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#architecture" rel="noopener noreferrer"&gt;Architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#audit-pipeline" rel="noopener noreferrer"&gt;Audit Pipeline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#health-scoring--rules" rel="noopener noreferrer"&gt;Health Scoring &amp;amp; Rules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#execution-modes" rel="noopener noreferrer"&gt;Execution Modes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#the-dashboard" rel="noopener noreferrer"&gt;The Dashboard&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#technology-stack" rel="noopener noreferrer"&gt;Technology Stack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#project-structure" rel="noopener noreferrer"&gt;Project Structure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#getting-started" rel="noopener noreferrer"&gt;Getting Started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#npm-scripts" rel="noopener noreferrer"&gt;npm Scripts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#configuration" rel="noopener noreferrer"&gt;Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#api-reference" rel="noopener noreferrer"&gt;API Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#security-model" rel="noopener noreferrer"&gt;Security Model&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#known-limitations" rel="noopener noreferrer"&gt;Known Limitations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#roadmap" rel="noopener noreferrer"&gt;Roadmap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#specification-documents" rel="noopener noreferrer"&gt;Specification Documents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#governance--community" rel="noopener noreferrer"&gt;Governance &amp;amp; Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion#contributors--acknowledgments" rel="noopener noreferrer"&gt;Contributors &amp;amp; Acknowledgments&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;RepoSage&lt;/strong&gt; audits GitHub repositories for CI/CD security, testing, dependency hygiene, documentation, security governance, and…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/ahmmikun/HacktoberFest-x-Fluxxion" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;RepoSage is organized as a clean TypeScript npm-workspaces monorepo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;packages/contracts&lt;/code&gt;&lt;/strong&gt;: Shared Zod schemas, strict TypeScript contracts (&lt;code&gt;LlmAuditOutputSchema&lt;/code&gt;, &lt;code&gt;AuditReport&lt;/code&gt;, &lt;code&gt;Finding&lt;/code&gt;), and JSON Schema converters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;apps/api&lt;/code&gt;&lt;/strong&gt;: Node.js/Express server orchestrating the audit pipeline:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;src/services/gh-cli-bridge.ts&lt;/code&gt;: In-memory &lt;code&gt;gh&lt;/code&gt; CLI session bridge with 5-minute cache and strict shell-injection protection.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/services/deterministic-engine.ts&lt;/code&gt;: 22-rule deterministic scoring engine across 6 dimensions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/services/manifest-compiler.ts&lt;/code&gt;: Evidence compiler with secret redaction and canonical SHA-256 serialization.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/services/gemma-service.ts&lt;/code&gt;: Dual-runtime model harness for Ollama (&lt;code&gt;gemma4:e4b&lt;/code&gt;) and Google AI Studio (&lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/services/citation-verifier.ts&lt;/code&gt;: Anti-hallucination engine that cross-verifies model findings against the real Git tree.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/services/consensus-service.ts&lt;/code&gt;: Computes agreement and latency matrices between local and hosted runtimes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;apps/web&lt;/code&gt;&lt;/strong&gt;: Next.js 15 (App Router) frontend with Tailwind CSS v4, real-time Server-Sent Events (SSE) streaming, and Mission Control dashboard.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Dual-Runtime Open-Weight AI Architecture
&lt;/h3&gt;

&lt;p&gt;Rather than relying on proprietary APIs, RepoSage is engineered specifically around &lt;strong&gt;open-weight Gemma 4&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Runtime&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Engine&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Local Privacy Mode&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gemma4:e4b&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Ollama &lt;code&gt;/api/chat&lt;/code&gt; with JSON schema&lt;/td&gt;
&lt;td&gt;100% offline, air-gapped code review with zero network egress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hosted Mode&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Google AI Studio via &lt;code&gt;@google/genai&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Deep architectural reasoning and edge-case synthesis&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both models are strictly constrained to a JSON Schema derived directly from our Zod contract (&lt;code&gt;LlmAuditOutputSchema&lt;/code&gt;) with &lt;code&gt;temperature: 0.1&lt;/code&gt;. If an inference response violates schema constraints, an automated single-retry repair loop feeds the parsing error back to the model to guarantee contract validity.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Anti-Hallucination Citation Verifier
&lt;/h3&gt;

&lt;p&gt;LLM code review tools are notorious for inventing non-existent file paths (e.g., claiming &lt;code&gt;.github/workflows/security.yml&lt;/code&gt; is vulnerable when the file doesn't exist).&lt;/p&gt;

&lt;p&gt;To solve this, RepoSage implements a two-gate verification pipeline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Git Tree Gate:&lt;/strong&gt; The evidence collector gathers the repository's complete recursive Git tree via GraphQL. The Citation Verifier checks every &lt;code&gt;filePath&lt;/code&gt; referenced in a finding against the true set of repository paths.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Deterministic Truth Gate:&lt;/strong&gt; If the model references a deterministic check ID (e.g., &lt;code&gt;CICD_PERMISSIONS&lt;/code&gt;), the verifier confirms that the check was executed and actually flagged an issue.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Core Citation Verifier Logic&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;verifyFinding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RawFinding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;validPaths&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;failedCheckIds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;VerifiedFinding&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filePath&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;validPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filePath&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;UNVERIFIED_PATH&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;quarantined&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checkId&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;failedCheckIds&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checkId&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;UNVERIFIED_CHECK&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;quarantined&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;VERIFIED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;quarantined&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any finding flagged as unverified is quarantined into telemetry, excluded from the actionable plan, and barred from issue creation.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. What Went Wrong &amp;amp; Lessons Learned
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Token Redaction in Manifests:&lt;/strong&gt; Early in development, repos with &lt;code&gt;.env.example&lt;/code&gt; files containing dummy keys or base64 tokens occasionally caused models to fixate on the example strings. We implemented a regex-based secret and key scrubber that redacts AWS keys, GitHub PATs, JWTs, and bearer tokens before canonical manifest hashing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shell Injection Prevention:&lt;/strong&gt; Because we bridge with the &lt;code&gt;gh&lt;/code&gt; CLI, user-supplied repository names (&lt;code&gt;owner/repo&lt;/code&gt;) could theoretically introduce shell injection vulnerabilities. We replaced all generic shell execution with &lt;code&gt;child_process.execFile&lt;/code&gt;, passing arguments strictly as string arrays and validating repository identifiers against &lt;code&gt;/^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+$/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Window Budgets:&lt;/strong&gt; Large repositories with thousands of files can overwhelm local context windows. We capped file trees to high-signal config files (&lt;code&gt;.github/**&lt;/code&gt;, &lt;code&gt;package.json&lt;/code&gt;, &lt;code&gt;tsconfig.json&lt;/code&gt;, &lt;code&gt;Dockerfile&lt;/code&gt;, &lt;code&gt;LICENSE&lt;/code&gt;, etc.) while retaining top-level file names to keep the prompt compact and fast.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Air-Gapped Confidentiality for Private IP:&lt;/strong&gt;
Most proprietary codebases cannot be shared with third-party cloud APIs due to compliance (SOC2, HIPAA, GDPR) and privacy restrictions. By running open-weight &lt;strong&gt;Gemma 4&lt;/strong&gt; locally via Ollama, RepoSage enables developers to audit sensitive internal infrastructure and proprietary algorithms completely offline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predictable Zero-Cost Operations:&lt;/strong&gt;
Cloud API subscriptions for code analysis scale with token counts and team seats. Open-weight models run on hardware you already own without recurring SaaS invoices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customizability &amp;amp; Freedom from Deprecation:&lt;/strong&gt;
When building on open weights, your audit pipeline isn't vulnerable to sudden API deprecations, pricing changes, or surprise model shifts. You can fine-tune, quantize, and pin specific model versions at will.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slow and Steady Wins the Race:&lt;/strong&gt;
In automated code audits, you don't need real-time chat latency. A small, efficient open-weight model like &lt;code&gt;Gemma 4 E4B&lt;/code&gt; running steadily on consumer hardware produces reliable, structured findings while consuming minimal energy.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;In honor of International Sloth Day, here is the concrete payoff for the developer who would rather let AI handle the heavy lifting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Manual Way:&lt;/strong&gt; Auditing a typical repository requires 1.5 to 3 hours of manually inspecting GitHub Actions workflows, checking secret permissions, verifying lockfiles, auditing documentation compliance, and writing out detailed GitHub issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The RepoSage Way:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Click 1:&lt;/strong&gt; Select repository.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;500ms:&lt;/strong&gt; Deterministic engine computes 0–100 health baseline across 22 rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;15–25s:&lt;/strong&gt; Local Gemma 4 interprets risks, highlights root causes, and drafts remediation plans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;0ms:&lt;/strong&gt; Citation Verifier quarantines hallucinations automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Click 2:&lt;/strong&gt; Click &lt;strong&gt;"Create GitHub Issue"&lt;/strong&gt; to file the issue, or &lt;strong&gt;"Copy Fix Prompt"&lt;/strong&gt; to paste directly into Cursor Composer or Claude Code.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Total Time Saved:&lt;/strong&gt; Over &lt;strong&gt;95% reduction in manual audit toil&lt;/strong&gt;, letting you relax while your repositories stay secure.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Featured Category: Best Use of Gemma ($200)&lt;/strong&gt;
RepoSage is built natively for Google's open-weight &lt;strong&gt;Gemma 4&lt;/strong&gt; family, leveraging &lt;code&gt;Gemma 4 E4B&lt;/code&gt; for local zero-cloud auditing and &lt;code&gt;Gemma 4 26B&lt;/code&gt; for hosted analysis, with structured Zod output validation, automatic repair loops, and dual-runtime benchmark comparisons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Also Built For DigitalOcean:&lt;/strong&gt;
RepoSage is fully containerized with Docker and ready for 1-click deployment on DigitalOcean Droplets and App Platform.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>gemma</category>
      <category>opensource</category>
    </item>
    <item>
      <title>New to this Community</title>
      <dc:creator>Salman Ahmad</dc:creator>
      <pubDate>Wed, 24 Dec 2025 08:48:28 +0000</pubDate>
      <link>https://dev.to/ahmmikun/new-to-this-community-p7c</link>
      <guid>https://dev.to/ahmmikun/new-to-this-community-p7c</guid>
      <description>&lt;p&gt;I am exited to be the part of it.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
