ScopeGuard:面向自由工作者的私隱優先開源 AI 項目範圍蔓延偵測工具
ScopeGuard: Privacy-First Open-Source AI Scope Creep Detector for Freelancers
ScopeGuard 是一款開源、本機運行的 AI 工具,會比對客戶要求與已簽署協議,偵測超出範圍的工作並引用相關條款。它可按多種語氣草擬回覆,生成變更單報價並匯出 PDF。推理透過 Ollama 使用 llama3:8b、qwen3:8b 或 gemma2:9b 等開放權重模型在本機執行,不會向外傳送請求。
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
Every freelance developer knows the dread of this Slack message:
"Hey! The site looks great. Quick question—can we also add user authentication, a customer admin portal, and Stripe checkout before we go live on Friday?"
Freelancers call it scope creep. In reality, it is unbilled hours, blown deadlines, and unpaid overtime. According to freelancer surveys, over 70% of independent contractors absorb unbilled client work simply because pushing back feels confrontational or risks the client relationship.
Even worse: freelancers work under strict NDAs and confidentiality agreements. You cannot simply upload your client’s proprietary statement of work (SOW) or confidential emails into ChatGPT or closed cloud APIs without violating client trust and contract terms.
Introducing ScopeGuard 🛡️
Protect your time. Get paid for every extra mile.
ScopeGuard is a 100% local, privacy-first AI application that acts as an objective contractual shield. It automatically analyzes incoming client messages against original signed agreements, flags scope creep with exact clause citations, drafts boundary-enforcing replies in multiple tones, and turns unpaid requests into billable Change Order Quotations with 1-click PDF exports.
Who Would Pay For It?
- Freelance Web & Mobile Developers: Who lose an average of $2,000–$8,000 annually in unbilled "small favors".
- Design & Digital Agencies: Managing multiple simultaneous client contracts who need objective change-order enforcement.
- Independent Consultants & Contractors: Who want an objective, neutral third party to draft polite, contract-backed pushback.
If ScopeGuard captures just one extra change order for $750, a $15/month subscription pays for itself for 4 years on day one.
Code
ScopeGuard 🛡️
Protect your time. Get paid for every extra mile.
ScopeGuard is an open-source, privacy-first AI application designed specifically for freelancers, agencies, and independent contractors to detect and prevent scope creep. By automatically comparing incoming client requests against signed project agreements and statement-of-work (SOW) documents, ScopeGuard identifies out-of-scope work, generates boundary-enforcing client replies in multiple tones, and builds deterministic change-order quotations with instant PDF exports.
Developed for the Hacktoberfest Open-Source AI Challenge under the theme Side Hustle.
💡 The Problem & The Solution
- The Problem: Freelancers frequently agree to fixed-scope projects, only for clients to request "small tweaks" and extra features disguised as minor additions (e.g., authentication, dark mode, blog CMS, payment gateways). Over time, this leads to unbilled hours, delayed delivery, and client tension.
- The Solution: ScopeGuard acts as an objective, contractual shield. It extracts clauses from your agreements, semantically compares incoming messages against agreed deliverables…
Repository: https://github.com/radhikaaa25/ScopeGuard
ScopeGuard is built as a complete, production-grade application:
- Backend: Python 3.11+ / Django 5 with Django REST Framework
- Frontend: React 19, TypeScript, Vite, Tailwind CSS (sleek dark mode design system), and Recharts
- PDF Engine: Deterministic ReportLab document generation
- License: Open-source under MIT
How I Built It
ScopeGuard was engineered from scratch around a local-first open-source AI pipeline:
┌────────────────────────────────────────────────────────────────────────┐
│ SCOPEGUARD ARCHITECTURE │
└────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────┐
│ MODERN REACT FRONTEND (PORT 5173) │
│ ┌────────────────────┐ ┌─────────────────────┐ ┌───────────────┐ │
│ │ Vite + React 19 │ │ Tailwind Dark Theme │ │ React Router │ │
│ └────────────────────┘ └─────────────────────┘ └───────────────┘ │
│ ┌────────────────────┐ ┌─────────────────────┐ ┌───────────────┐ │
│ │ Recharts Analytics │ │ Lucide UI Icons │ │ Axios Client │ │
│ └────────────────────┘ └─────────────────────┘ └───────────────┘ │
└──────────────────────────────────┬───────────────────────────────────┘
│ HTTP / REST API (Port 8000)
▼
┌──────────────────────────────────────────────────────────────────────┐
│ DJANGO REST FRAMEWORK BACKEND │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │ Endpoints: /api/projects /agreements /analyses /quotations │ │
│ └────────────────────────────────┬───────────────────────────────┘ │
│ ┌────────────────────────┼────────────────────────┐ │
│ ▼ ▼ ▼ │
│ ┌───────────────┐ ┌────────────────┐ ┌───────────────┐ │
│ │ SQLite / ORM │ │ ReportLab PDF │ │ Document Text │ │
│ │ Database │ │ Change Orders │ │ PDF, DOCX, TXT│ │
│ └───────────────┘ └────────────────┘ └───────────────┘ │
└──────────────────────────────────┬───────────────────────────────────┘
│ Local Pipeline (Zero Cloud APIs)
▼
┌──────────────────────────────────────────────────────────────────────┐
│ LOCAL OPEN-SOURCE AI PIPELINE │
│ ┌────────────────────────┐ ┌────────────────────────────┐ │
│ │ ChromaDB Vector Store │ │ SentenceTransformers │ │
│ │ (Local HNSW Index) │◄────────►│ (all-MiniLM-L6-v2) │ │
│ └───────────┬────────────┘ └──────────────┬─────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌────────────────────────┐ ┌────────────────────────────┐ │
│ │ Ollama Local LLM │ │ Local Semantic Fallback │ │
│ │ (llama3 / qwen3) │◄────────►│ (Deterministic Regex/NLP) │ │
│ └────────────────────────┘ └────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────┘
The Open AI Components
-
Local LLM Inference via Ollama: All deep reasoning and contractual extraction runs locally through Ollama using open-weight models such as
llama3:8b,qwen3:8b, orgemma2:9b. No requests leave your computer. - Local Vector Search with ChromaDB: When an agreement (PDF, DOCX, or TXT) is uploaded, it is chunked and indexed into an on-device ChromaDB vector database with cosine similarity search.
-
Local Embeddings with SentenceTransformers: Semantic chunking uses
all-MiniLM-L6-v2locally via PyTorch—delivering millisecond semantic retrieval with zero cloud dependencies. - Resilient Local NLP Fallback Engine: If a freelancer is running on battery or Ollama is offline, ScopeGuard automatically falls back to an internal deterministic regex and semantic rule engine. The app never crashes and remains 100% functional offline.
- Deterministic Pricing Engine: Financial calculations (hourly rates, line items, and totals) are strictly deterministic math—preventing LLM hallucination on financial agreements.
Why Does Open Innovation Matter?
Open innovation is not just an implementation detail for ScopeGuard—it is the entire reason the product can exist.
- Client Confidentiality & NDA Compliance: Freelancers cannot paste client agreements, trade secrets, or unreleased feature roadmaps into OpenAI or cloud LLM endpoints. Closed APIs introduce data leakage risks and terms-of-service surveillance. Open-weight models running on-device guarantee 100% data privacy and NDA compliance.
- Zero Marginal Inference Cost: For a side hustle or bootstrapped solo product, closed API rate limits and token fees eat margins alive. By leveraging open-weight models, ScopeGuard runs with $0 in recurring inference costs.
- No Vendor Lock-In or Arbitrary De-platforming: Closed AI providers frequently deprecate model endpoints, alter alignment rules, or raise prices without notice. Open-weight models provide perpetual reproducibility and reliability.
- Targeted Semantic Precision: By combining local vector search with open embeddings, we achieve high-precision clause retrieval without paying to feed entire 50-page contracts into huge cloud context windows.
My Agent Session
ScopeGuard was pair-programmed using DevRelay and the Antigravity agentic workflow to scaffold the Django REST architecture, build the local ChromaDB pipeline, and implement the React 19 UI system.
My First User
To test ScopeGuard in the real world, I put it into the hands of my friend Sarah, a freelance frontend developer who builds custom Next.js web applications for local businesses.
She was in the middle of a project where the client sent this exact message:
"Could you also set up a members-only portal so our customers can create accounts, log in, and view their past orders?"
We uploaded her original project agreement into ScopeGuard and ran the client's message through the analyzer:
-
Result: ScopeGuard flagged the request as
OUT_OF_SCOPEwith 92% confidence. -
Cited Clause:
EXCLUDED FROM SCOPE: User authentication, customer login systems, or backend databases. - Action: ScopeGuard generated a Professional reply acknowledging the idea, explaining that it falls outside the initial milestone, and generated a $1,350 Change Order Quotation (18 hours @ $75/hr).
Sarah sent the response directly to the client. Within two hours, the client replied: "Understood! Let's approve the change order so we can get it into the next phase."
Her feedback:
"The hardest part of freelancing is telling a client 'no' without sounding difficult. ScopeGuard made it completely objective—it wasn't me saying no, it was the contract we both signed. I would easily pay $20 a month for this peace of mind."
Prize Categories
- Hacktoberfest Open-Source AI Challenge: Week 2 — Side Hustle (Main Track)
-
Best Use of Gemma (Open-Weight Model Category): Tested and fully compatible with
gemma2:9bandgemma2:2bon Ollama for efficient on-device contractual inference.
Protect your time. Get paid for every extra mile. Check out the open-source repo on GitHub and star the project! 🛡️
來源:DEV Community · dev.to