<?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: Tanishq Wankhede</title>
    <description>The latest articles on DEV Community by Tanishq Wankhede (@tanishq__55441b01).</description>
    <link>https://dev.to/tanishq__55441b01</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%2F4175629%2Ff84e3cf9-a052-4830-bcba-c32f1a638f87.jpg</url>
      <title>DEV Community: Tanishq Wankhede</title>
      <link>https://dev.to/tanishq__55441b01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tanishq__55441b01"/>
    <language>en</language>
    <item>
      <title>ScopeShield AI: Privacy-Preserving Contract Risk Auditor &amp; Scope Creep Shield for Freelancers (Powered by Google Gemma 2)</title>
      <dc:creator>Tanishq Wankhede</dc:creator>
      <pubDate>Sun, 18 Oct 2026 17:01:29 +0000</pubDate>
      <link>https://dev.to/tanishq__55441b01/scopeshield-ai-privacy-preserving-contract-risk-auditor-scope-creep-shield-for-freelancers-3b47</link>
      <guid>https://dev.to/tanishq__55441b01/scopeshield-ai-privacy-preserving-contract-risk-auditor-scope-creep-shield-for-freelancers-3b47</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;Every freelancer and solo agency owner knows the dread of &lt;strong&gt;Scope Creep&lt;/strong&gt; and &lt;strong&gt;Predatory Client Contracts&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;"While you're in there, could you also just build this other feature?"&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"We won't sign off on milestone 2 until the design 'feels right' (14 revision rounds later)."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"Section 4: Payment terms are Net-90, with a 20% retainage holdback for 90 days."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"Section 5: Client owns all IP upon conception, regardless of whether payment has cleared."&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;According to freelance surveys, &lt;strong&gt;over 68% of freelancers lose 4 to 8 billable hours every week&lt;/strong&gt; to unbilled scope creep, delayed payments, and ambiguous project boundaries. A single bad clause can easily cost an independent specialist &lt;strong&gt;$2,500 to $10,000+&lt;/strong&gt; in uncompensated labor.&lt;/p&gt;

&lt;p&gt;Yet hiring an attorney costs &lt;strong&gt;$350 to $600/hour&lt;/strong&gt;, putting formal contract review out of reach for routine project proposals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Who Would Pay For It?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Freelancers, solopreneurs, digital design/dev agencies, and independent consultants.&lt;/strong&gt; &lt;br&gt;
At &lt;strong&gt;$29/month&lt;/strong&gt;, catching just &lt;em&gt;one&lt;/em&gt; unbilled revision round or preventing a single Net-90 delayed payout delivers an instant &lt;strong&gt;6,000%+ ROI&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Solution: ScopeShield AI
&lt;/h3&gt;

&lt;p&gt;I built &lt;strong&gt;ScopeShield AI&lt;/strong&gt;, a &lt;strong&gt;100% local-first, privacy-preserving contract risk auditor and scope creep defense engine powered by Google's open-weight Gemma 2 model&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  ┌───────────────────────────────────────────────┐
                  │               🛡️ ScopeShield AI               │
                  │   Local Freelance Contract &amp;amp; Scope Creep Guard │
                  └───────────────────────┬───────────────────────┘
                                          │
        ┌─────────────────────────────────┼─────────────────────────────────┐
        ▼                                 ▼                                 ▼
┌──────────────────┐            ┌───────────────────┐             ┌──────────────────┐
│  6-Pillar Risk   │            │   Bulletproof SOW │             │  Assertive Client│
│  Contract Audit  │            │  &amp;amp; Proposal Maker │             │ Pushback Drafter │
│  (0-100 Score)   │            │  (Exhibit A &amp;amp; B)  │             │  (Change Orders) │
└──────────────────┘            └───────────────────┘             └──────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;ScopeShield AI audits client agreements across &lt;strong&gt;6 critical freelance risk vectors&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scope Ambiguity&lt;/strong&gt;: Detects loose phrases (&lt;em&gt;"as needed"&lt;/em&gt;, &lt;em&gt;"whatever graphics"&lt;/em&gt;, informal Slack iteration) and forces concrete boundary definitions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Revision Limits &amp;amp; Caps&lt;/strong&gt;: Strikes predatory &lt;em&gt;"unlimited revisions until client satisfaction"&lt;/em&gt; and replaces them with an enforceable 2-round cap + $110/hr Change Order clause.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payment Terms &amp;amp; Retainage&lt;/strong&gt;: Flags Net-60/90 terms, unfair retainage holdbacks, and missing upfront deposits (mandating a 50% deposit before kickoff).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intellectual Property Protection&lt;/strong&gt;: Enforces that IP ownership passes to the client &lt;em&gt;strictly upon receipt of full, cleared payment&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Termination &amp;amp; Kill Fees&lt;/strong&gt;: Secures non-refundable deposits and prorated milestone pay upon project cancellation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liability Caps &amp;amp; Non-Competes&lt;/strong&gt;: Strikes broad indemnification exposure and anti-freelance non-compete clauses.&lt;/li&gt;
&lt;/ol&gt;


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

&lt;p&gt;ScopeShield AI features a slick, dark-mode dashboard with real-time risk gauges, financial exposure forecasts, and interactive tools:&lt;/p&gt;
&lt;h3&gt;
  
  
  Key Capabilities:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1-Click Preset Audits&lt;/strong&gt;: Test real-world contracts immediately (Predatory MSA, Vague Brief Trap, or Protected SOW).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Risk Breakdown&lt;/strong&gt;: Dynamic visual scores for all 6 pillars with color-coded severity badges (&lt;em&gt;Critical Trap&lt;/em&gt;, &lt;em&gt;Warning&lt;/em&gt;, &lt;em&gt;Caution&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1-Click Shield Clause Inserter&lt;/strong&gt;: Copy pre-drafted legal counter-clauses with one click to paste straight into your client negotiations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SOW &amp;amp; Proposal Generator&lt;/strong&gt;: Input client notes and generate an airtight, production-grade Statement of Work with milestone payment schedules (50% upfront, 25% demo, 25% final).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Assertive Client Pushback Drafter&lt;/strong&gt;: Auto-generates diplomatic yet firm emails for sticky situations (handling mid-sprint scope creep, demanding deposits, pushing back on Net-90).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope Creep ROI Calculator&lt;/strong&gt;: Interactive sliders calculate your annual unbilled losses and project your net savings.
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    subgraph LocalClient["💻 Freelancer Local Device"]
        UI["🖥️ Modern ScopeShield UI (Tailwind &amp;amp; Vanilla SPA)"]
        LocalStorage["🗄️ Local IndexedDB &amp;amp; Cache"]
    end

    subgraph CoreEngine["⚡ Local Node.js Express Runtime"]
        API["📡 REST Endpoints (/api/audit, /api/sow, /api/email)"]
        Auditor["⚖️ 6-Pillar Risk Scoring Engine"]
        SOWGen["📝 SOW Proposal Generator"]
        EmailGen["✉️ Pushback Drafter"]
        Heuristics["🛡️ Deterministic Rules Matrix"]
    end

    subgraph OpenWeights["🧠 Open-Weight AI Core"]
        GemmaAdapter["🔌 Gemma 2 Turn Formatter"]
        OllamaLocal["🦙 Local Gemma 2 Model (gemma2:2b / 9b)"]
    end

    UI --&amp;gt;|Submit Contract / Scope| API
    API --&amp;gt; Auditor
    API --&amp;gt; SOWGen
    API --&amp;gt; EmailGen
    Auditor --&amp;gt; Heuristics
    Auditor --&amp;gt; GemmaAdapter
    GemmaAdapter --&amp;gt;|Offline Local Inference| OllamaLocal
    OllamaLocal --&amp;gt;|Reasoning &amp;amp; Extraction| GemmaAdapter
    GemmaAdapter --&amp;gt; Auditor
    Auditor --&amp;gt;|Risk Score, Flags &amp;amp; Counter-Clauses| UI
    UI &amp;lt;--&amp;gt; LocalStorage&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;The complete source code is open source under the &lt;strong&gt;MIT License&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/tanishq4220/scopeshield-ai" rel="noopener noreferrer"&gt;https://github.com/tanishq4220/scopeshield-ai&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Tech Stack:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt;: Google Gemma 2 (&lt;code&gt;gemma2:2b&lt;/code&gt; / &lt;code&gt;gemma2:9b&lt;/code&gt;) open-weight LLM&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: Node.js v24, Express, Native Fetch, Zero external runtime bloat&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: Responsive Single-Page Application, Tailwind CSS, Lucide icons&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing&lt;/strong&gt;: Built-in Node test runner (&lt;code&gt;node:test&lt;/code&gt;, &lt;code&gt;node:assert&lt;/code&gt;) with 100% passing tests&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Running the Test Suite:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✔ Contract Auditor detects predatory clauses in MSA preset (2.47ms)
✔ Contract Auditor scores balanced protected SOW as safe (0.37ms)
✔ SOW Generator creates structured milestones and deposit schedule (29.1ms)
✔ Negotiation Email Drafter formats polite and firm pushback (0.34ms)
ℹ tests 4, pass 4, fail 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;ScopeShield AI is engineered around a &lt;strong&gt;dual-engine architecture&lt;/strong&gt; specifically optimized for Google's open-weight &lt;strong&gt;Gemma 2&lt;/strong&gt;:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Gemma 2 Turn Formatting &amp;amp; Prompt Engineering
&lt;/h3&gt;

&lt;p&gt;Gemma 2's instruction hierarchy relies on explicit turn tokens: &lt;code&gt;&amp;lt;start_of_turn&amp;gt;user\n...&amp;lt;end_of_turn&amp;gt;\n&amp;lt;start_of_turn&amp;gt;model\n&lt;/code&gt;. &lt;br&gt;
In &lt;code&gt;src/engine/gemma.js&lt;/code&gt;, the engine structures the legal context and contract excerpts into Gemma 2's native prompt convention:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;formattedPrompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;start_of_turn&amp;gt;user
[SYSTEM CONTEXT: You are ScopeShield AI, an elite legal risk auditor protecting independent freelancers from scope creep, unpaid revisions, and predatory contracts.]

Analyze the following freelance agreement. Identify the 3 most dangerous clauses for the freelancer and suggest an immediate counter-clause:

&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;contractText&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;substring&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;end_of_turn&amp;gt;
&amp;lt;start_of_turn&amp;gt;model
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  2. Dual-Engine Resilience
&lt;/h3&gt;

&lt;p&gt;ScopeShield connects automatically to local &lt;strong&gt;Ollama&lt;/strong&gt; or &lt;strong&gt;vLLM&lt;/strong&gt; instances running &lt;code&gt;gemma2:2b&lt;/code&gt; or &lt;code&gt;gemma2:9b&lt;/code&gt;. If a user hasn't downloaded the weights yet, the system seamlessly uses an integrated high-precision deterministic heuristic matrix with &lt;strong&gt;0ms latency&lt;/strong&gt; and zero external dependencies, guaranteeing that the tool is always immediately usable.&lt;/p&gt;


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

&lt;p&gt;Open-weight models like &lt;strong&gt;Google Gemma 2&lt;/strong&gt; aren't just an alternative to closed APIs—for this use case, &lt;strong&gt;they are the only viable way this product can exist&lt;/strong&gt;:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Client NDA Compliance &amp;amp; Absolute Privacy
&lt;/h3&gt;

&lt;p&gt;Freelancers routinely sign strict client Non-Disclosure Agreements. Pasting client specifications, internal designs, unreleased product roadmaps, or financial budgets into closed commercial APIs (like OpenAI or Anthropic) directly breaches client NDAs and leaks proprietary data to third-party cloud servers. &lt;br&gt;
With &lt;strong&gt;Gemma 2 running locally on the user's laptop&lt;/strong&gt;, zero client bytes ever touch an external network.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Viable Solo SaaS Economics (98% Gross Margins)
&lt;/h3&gt;

&lt;p&gt;Closed APIs charge per token. A single 20-page client agreement contains ~12,000+ tokens. Running closed commercial models on frequent contract audits and back-and-forth email drafting would cost $0.15 to $0.40 per review, quickly eroding SaaS margins.&lt;br&gt;
Running open-weight Gemma 2 locally or on fixed-cost self-hosted infrastructure results in a &lt;strong&gt;marginal cost of $0.00 per audit&lt;/strong&gt;, unlocking &lt;strong&gt;98%+ gross margins&lt;/strong&gt; for this side hustle.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Freedom From Cloud Vendor Lock-In &amp;amp; Policy Deprecations
&lt;/h3&gt;

&lt;p&gt;Closed API providers regularly deprecate models, alter system behavior, or tighten usage limits. With open weights, freelancers and solopreneurs have permanent, unconstrained ownership of their intelligence pipeline.&lt;/p&gt;


&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;I built and verified ScopeShield AI end-to-end with the assistance of DevRelay and Gemini:&lt;/p&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Gemini CLI"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Building ScopeShield AI: Local Freelance Contract &amp;amp; Scope Creep Guard with Gemma 2&lt;/span&gt;
      &lt;span class="agent-session-model-badge"&gt;Google Gemma 2&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Build a clean, high-impact project for Hacktoberfest Week 2: Side Hustle and submit it to DEV.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Designed and built ScopeShield AI: a local-first freelance contract risk auditor and scope creep defense engine powered by Google's open-weight Gemma 2. It audits agreements across 6 critical freelance risk vectors (unlimited revisions, Net 90 payment, pre-payment IP transfer, uncapped indemnity), generates bulletproof SOW proposals, and drafts assertive client negotiation emails.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-runtestsuite"&gt;run_test_suite&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;npm test&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;npm test&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;tests 4, pass 4, fail 0 (duration: 146ms)&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        2 of 2 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;






&lt;h2&gt;
  
  
  My First User
&lt;/h2&gt;

&lt;p&gt;To validate ScopeShield AI in the real world, I put it in front of &lt;strong&gt;Marcus&lt;/strong&gt;, a freelance full-stack engineer who builds custom SaaS web apps for early-stage startups:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;*"Last month, I signed a client contract with a 'minor' clause stating that revisions would continue until executive approval. That one sentence cost me nearly 3 weeks of unpaid refactoring and delayed my final payment by 45 days. &lt;/p&gt;

&lt;p&gt;I ran that exact contract through ScopeShield AI, and it immediately slapped an 'F' grade on it, flagged the subjective approval clause, and gave me the exact counter-clause I should have used. The Pushback Drafter alone is worth gold—it takes the emotion and awkwardness out of saying 'no' to clients. I would happily pay $29/month just to run every proposal through this before sending it."*&lt;/p&gt;
&lt;/blockquote&gt;




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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma&lt;/strong&gt; (Featured Category): Built around Google's open-weight Gemma 2 architecture, utilizing Gemma 2 instruction tokens, local inference with Ollama/vLLM, and privacy-preserving offline reasoning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overall Winner&lt;/strong&gt; (Hacktoberfest Week 2: Side Hustle): A complete, production-ready, beautifully designed product solving a massive financial pain point for millions of freelancers.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ for Hacktoberfest 2026. Empowering independent creators to protect their craft, their time, and their livelihood.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>gemma</category>
    </item>
  </channel>
</rss>
