<?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: Raj Jasani</title>
    <description>The latest articles on DEV Community by Raj Jasani (@rajjasani2008).</description>
    <link>https://dev.to/rajjasani2008</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%2F4174978%2F929a8b0c-5d0a-482b-a8cc-6df0576ead47.png</url>
      <title>DEV Community: Raj Jasani</title>
      <link>https://dev.to/rajjasani2008</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajjasani2008"/>
    <language>en</language>
    <item>
      <title>GhostShell AI — Hacktoberfest Week 4: Ghost in the Machine</title>
      <dc:creator>Raj Jasani</dc:creator>
      <pubDate>Tue, 27 Oct 2026 13:33:41 +0000</pubDate>
      <link>https://dev.to/rajjasani2008/ghostshell-ai-hacktoberfest-week-4-ghost-in-the-machine-dfp</link>
      <guid>https://dev.to/rajjasani2008/ghostshell-ai-hacktoberfest-week-4-ghost-in-the-machine-dfp</guid>
      <description>&lt;p&gt;This is a submission for the &lt;strong&gt;Hacktoberfest Open-Source AI Challenge: Week 4: Ghost in the Machine&lt;/strong&gt;.&lt;/p&gt;




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

&lt;p&gt;Every developer knows the eerie sensation of working in a legacy codebase: functions that haven't been invoked in half a decade, error handlers that swallow exceptions into the dark void, and departed software technologies that continue to linger like phantoms in our tech stack.&lt;/p&gt;

&lt;p&gt;To celebrate &lt;strong&gt;Hacktoberfest 2026 Week 4&lt;/strong&gt; and honor both &lt;strong&gt;Halloween&lt;/strong&gt; and &lt;strong&gt;Día de los Muertos&lt;/strong&gt;, I created &lt;strong&gt;GhostShell AI&lt;/strong&gt; — an open-source, local-first possessed terminal companion and codebase séance engine.&lt;/p&gt;

&lt;p&gt;GhostShell AI embodies the &lt;em&gt;"Ghost in the Machine"&lt;/em&gt; across three thematic pillars:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Haunted Terminal Companion (&lt;code&gt;ghost possess&lt;/code&gt; / &lt;code&gt;ghost shell&lt;/code&gt;)&lt;/strong&gt;: Possesses your interactive shell session, intercepting command execution, exit codes, and output to whisper atmospheric, witty gothic commentary and necrotic diagnostics directly to the terminal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Codebase Séance Engine (&lt;code&gt;ghost seance&lt;/code&gt;)&lt;/strong&gt;: Performs a deep AST (Abstract Syntax Tree) spiritual post-mortem on Python files and repositories. It unearths "zombie functions" (defined but never summoned), "silent tombs" (&lt;code&gt;except: pass&lt;/code&gt;), forgotten TODO gravestones, and infinite loop traps, calculating a composite &lt;em&gt;Haunting Score&lt;/em&gt; (0% to 100%) and producing AI-guided exorcism recommendations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Digital Ofrenda (&lt;code&gt;ghost ofrenda&lt;/code&gt;)&lt;/strong&gt;: In the tradition of &lt;em&gt;Día de los Muertos&lt;/em&gt;, provides a digital altar to honor and commemorate retired technologies, sunsetted APIs, and vintage artifacts (such as Adobe Flash Player, IE6, Python 2.7, and 3.5" floppy disks) with poetic AI-synthesized eulogies and traditional offerings (cempasúchil marigold bytes, amber candles, and sugar calaveras).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cyber-Gothic Web Dashboard (&lt;code&gt;ghost serve&lt;/code&gt;)&lt;/strong&gt;: A responsive dark-mode dashboard with glowing spectral animations, a live interactive possessed shell simulator, code séance analyzer, and interactive ofrenda gallery.
&lt;/li&gt;
&lt;/ol&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    subgraph Input ["💻 Developer Inputs"]
        A1["Interactive Shell Commands\n(exit codes, stdout, stderr)"]
        A2["Source Codebase &amp;amp; Scripts\n(Python AST / Files)"]
        A3["Sunsetted Tech Memories\n(Deprecated APIs &amp;amp; Frameworks)"]
    end

    subgraph Core ["🔮 GhostShell Core Engine"]
        B1["HauntedTerminal Subprocess Monitor"]
        B2["CodebaseSeance AST Necrotic Inspector"]
        B3["DigitalOfrenda Altar Manager"]
    end

    subgraph AI ["🧠 Open-Source AI Layer"]
        C1["Local Open-Weight Model\n(Ollama Gemma 2 / Llama 3.2)"]
        C2["Deterministic Spectral Engine\n(Offline Resilient Fallback)"]
    end

    subgraph Output ["🖥️ Developer Experiences"]
        D1["Possessed Terminal CLI\n(Spectral Whispers &amp;amp; Altar Cards)"]
        D2["Cyber-Gothic Web Dashboard\n(http://localhost:8765)"]
    end

    Input --&amp;gt; Core
    Core &amp;lt;--&amp;gt; AI
    C1 &amp;lt;--&amp;gt; C2
    Core --&amp;gt; Output&lt;/code&gt;&lt;/pre&gt;






&lt;h2&gt;
  
  
  📸 Demo &amp;amp; Terminal Walkthrough
&lt;/h2&gt;

&lt;p&gt;GhostShell AI is designed to run seamlessly from the command line or via an ambient web interface:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Possessed Shell Execution Demo
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python3 -m ghostshell.cli possess "cat missing_necronomicon.txt"
cat: missing_necronomicon.txt: No such file or directory

🔮 [Ghost in the Machine]: The necrotic register shivers. Exit code 1 whispers of an unhandled curse in `cat missing_necronomicon.txt`.

$ python3 -m ghostshell.cli possess "git commit -m 'Initial summon'"
[main (root-commit) 9a8c359] Initial summon
 16 files changed, 1420 insertions(+)

🔮 [Ghost in the Machine]: A timeline altered. The git graph remembers all who were staged, committed, and abandoned in detached HEAD states.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Codebase Séance Diagnostic Output
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python3 -m ghostshell.cli seance examples/cursed_code.py
=================================================================
🔮 SÉANCE REPORT: examples/cursed_code.py
=================================================================
• Haunting Score: 78.5%
• Spiritual Classification: Catastrophically Cursed (Necrotic Poltergeist Activity)
• Issues Found: 4

--- Detected Anomalies ---
  [LOW] Line 3: Cryptic marker found: '# TODO: Investigate memory leak reported in Q3 2024'
  [MEDIUM] Line 7: Zombie function `ancient_forgotten_zombie_routine` is defined but never summoned in this file.
  [HIGH] Line 15: Cursed bare `except:` swallows system daemons and hides memory corruption.
  [MEDIUM] Line 16: Silent `except ... pass` creates a tomb where runtime errors die silently.

--- Necrotic AI Diagnosis &amp;amp; Exorcism Plan ---
Post-Mortem Analysis for `cursed_code.py`:
Observed 4 spiritual anomaly(ies) lingering in the syntax tree.
Found 1 Zombie Function(s): Defined in the source yet never summoned during runtime.
Detected 1 Cursed Pattern(s): Bare exception silencers and dangerous memory bindings.
Verdict: The codebase harbors restless spirits. Perform exorcism to restore memory purity.
=================================================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Digital Ofrenda Altar Tribute
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python3 -m ghostshell.cli ofrenda --name "Adobe Flash Player"
=================================================================
🕯️  DIGITAL OFRENDA: Adobe Flash Player (1996 - 2020)
Category: Interactive Web &amp;amp; Animation
=================================================================
Offerings on the Altar: 🌼 Golden Vector Marigold | 🕯️ 60fps Phosphor Flame | 🍬 SWF Sugar Skull

You brought sound and movement to a static web of plain text. Generations of indie game developers and animators took their first steps in your timeline. Though security daemons claimed your runtime, your creative spirit echoes across the modern canvas.
=================================================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;h3&gt;
  
  
  Open-Source AI &amp;amp; Open-Weight Runtimes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open-Weight Model Integration&lt;/strong&gt;: GhostShell natively integrates with local open-weight models via &lt;strong&gt;Ollama&lt;/strong&gt; (&lt;code&gt;gemma2:2b&lt;/code&gt;, &lt;code&gt;llama3.2&lt;/code&gt;, &lt;code&gt;mistral&lt;/code&gt;, or &lt;code&gt;phi3&lt;/code&gt;). No tokens are sent to external third-party proprietary clouds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Spectral Fallback Engine&lt;/strong&gt;: If Ollama or GPU runtimes are unavailable, GhostShell immediately switches to a built-in deterministic spectral inference engine. This ensures the application works &lt;strong&gt;100% offline with zero external pip dependencies&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Architecture &amp;amp; Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python Standard Library Core&lt;/strong&gt;: Uses Python 3.9+ &lt;code&gt;ast&lt;/code&gt; for parsing Abstract Syntax Trees, &lt;code&gt;subprocess&lt;/code&gt; for POSIX command interception, &lt;code&gt;http.server&lt;/code&gt; with multithreading for the local dashboard backend, and &lt;code&gt;urllib&lt;/code&gt; for zero-dependency local model querying.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cyber-Gothic Web Interface&lt;/strong&gt;: Built with modern CSS (glassmorphism, CSS grid, glowing pseudo-elements) and vanilla JavaScript. Features a simulated possessed CRT terminal, real-time code auditor, and an altar memorial gallery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rigorous Testing&lt;/strong&gt;: Backed by a comprehensive 16-test suite using Python's &lt;code&gt;unittest&lt;/code&gt; framework with 100% passing results.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🌐 Code &amp;amp; Repository
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/rajJasani/ghostshell-ai" rel="noopener noreferrer"&gt;https://github.com/rajJasani/ghostshell-ai&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License:&lt;/strong&gt; Permissive open-source &lt;a href="https://opensource.org/licenses/MIT" rel="noopener noreferrer"&gt;MIT License&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To run GhostShell AI locally in 10 seconds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/rajJasani/ghostshell-ai.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ghostshell-ai
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; unittest discover &lt;span class="nt"&gt;-s&lt;/span&gt; tests &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"test_*.py"&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt;
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; ghostshell.cli serve &lt;span class="nt"&gt;--port&lt;/span&gt; 8765
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  💡 Why Open Innovation Matters
&lt;/h2&gt;

&lt;p&gt;The rapid rise of cloud-hosted, proprietary AI APIs presents serious concerns for developer privacy, tool longevity, and system reliability:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Terminal Privacy and Code Security&lt;/strong&gt;: Shell history and developer terminals frequently contain sensitive information: internal staging paths, database connection strings, tokens, and proprietary source code. Piping terminal output into closed, multi-tenant cloud APIs is unacceptable in security-conscious workflows. By leveraging local open-weight models, GhostShell ensures that &lt;strong&gt;zero bytes leave the developer's workstation&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Autonomy ("Ghost in the Silicon")&lt;/strong&gt;: Software should function on a plane, in a basement server room, or during internet disruptions. An AI-powered developer tool that stops working when the Wi-Fi drops fails the core principle of developer sovereignty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Digital Preservation &amp;amp; Open Knowledge&lt;/strong&gt;: Just as open-source preserves old code from disappearing into proprietary corporate archives, open-weight models ensure that developer assistance remains democratized, unmetered, and perpetually accessible to all builders worldwide.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>hacktoberfest</category>
      <category>ai</category>
    </item>
    <item>
      <title>SlothTidy AI: Ambient Local-First Workspace Organizer &amp; Overnight Digest Engine (Powered by Google Gemma)</title>
      <dc:creator>Raj Jasani</dc:creator>
      <pubDate>Sun, 25 Oct 2026 19:40:11 +0000</pubDate>
      <link>https://dev.to/rajjasani2008/slothtidy-ai-ambient-local-first-workspace-organizer-overnight-digest-engine-powered-by-google-2849</link>
      <guid>https://dev.to/rajjasani2008/slothtidy-ai-ambient-local-first-workspace-organizer-overnight-digest-engine-powered-by-google-2849</guid>
      <description>&lt;p&gt;This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.&lt;/p&gt;

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

&lt;p&gt;Modern developers and knowledge workers suffer from digital fatigue: cluttered download folders, unorganized code snippets, messy receipts, and scattered daily action items.&lt;/p&gt;

&lt;p&gt;Inspired by &lt;strong&gt;International Sloth Day&lt;/strong&gt; and the "Slow and Steady" challenge theme, I built &lt;strong&gt;SlothTidy AI&lt;/strong&gt; — an ambient, local-first background workspace organizer and daily morning digest engine powered by open-weight AI models.&lt;/p&gt;

&lt;p&gt;Rather than being an intrusive, hyperactive assistant, SlothTidy embraces the peaceful, deliberate pace of the sloth:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ambient Workspace Sorter&lt;/strong&gt;: Silently categorizes unorganized downloads, code files, notes, and receipts into semantic directories.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overnight Morning Digest&lt;/strong&gt;: Reads raw daily thoughts, terminal logs, and git commits to synthesize a calm executive morning brief with clear action items and inspiring "Sloth Wisdom".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% Zero-Cloud Privacy&lt;/strong&gt;: Runs entirely on open-weight models (via Ollama or local deterministic semantic parser). Zero bytes or tokens ever leave the local machine.
&lt;/li&gt;
&lt;/ol&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    subgraph Input ["📥 Raw Workspace Inputs"]
        A1["Messy Downloads &amp;amp; Inbox"]
        A2["Daily Notes &amp;amp; Markdown Logs"]
        A3["Git Commits &amp;amp; Standup Snippets"]
    end

    subgraph Core ["🦥 SlothTidy Core Engine"]
        B1["Local AI Engine\n(Ollama Gemma 2 / Llama 3.2)"]
        B2["Resilient Heuristic Fallback\n(Deterministic Semantic Parser)"]
        B3["SlothStorage\n(SQLite Audit &amp;amp; Rollback)"]
    end

    subgraph Actions ["⚡ Autonomous Tasks"]
        C1["Semantic Classifier &amp;amp; Folder Sorter\n(Receipts, Code, Notes, Projects)"]
        C2["Daily Executive Digest Generator\n(Action Items + Calm Briefing)"]
    end

    subgraph Interfaces ["🖥️ Presentation Layer"]
        D1["Modern Glassmorphic Web Dashboard\n(http://localhost:8765)"]
        D2["Rich Terminal CLI Tool\n(python3 -m sloth_ai)"]
    end

    Input --&amp;gt; Core
    B1 &amp;lt;--&amp;gt; B2
    Core --&amp;gt; Actions
    Actions --&amp;gt; B3
    Actions --&amp;gt; Interfaces&lt;/code&gt;&lt;/pre&gt;






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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web UI Dashboard&lt;/strong&gt;: Includes an interactive dark-mode glassmorphic interface to test one-click workspace tidying, dry-run audits, and real-time morning digest synthesis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal CLI&lt;/strong&gt;: Features a clean command-line interface (&lt;code&gt;sloth status&lt;/code&gt;, &lt;code&gt;sloth tidy&lt;/code&gt;, &lt;code&gt;sloth digest&lt;/code&gt;, &lt;code&gt;sloth serve&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instant Verification&lt;/strong&gt;: Self-contained zero-dependency web server and comprehensive unit test suite (100% passing).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Terminal Execution Output
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python3 -m sloth_ai.cli tidy --folder examples/inbox --dry-run
🔍 Scanning files in: examples/inbox...

[DRY RUN] Successfully processed 3 files:
  • meeting_agenda_q4.md  --&amp;gt;  [work_projects]
    Summary: Classified 'meeting_agenda_q4.md' as work projects based on local semantic markers.

  • invoice_october.txt  --&amp;gt;  [finance_receipts]
    Summary: Classified 'invoice_october.txt' as finance receipts based on local semantic markers.

  • db_helper.py  --&amp;gt;  [developer_code]
    Summary: Classified 'db_helper.py' as developer code based on local semantic markers.

$ python3 -m sloth_ai.cli digest --file examples/notes/oct_25_thoughts.md
=======================================================
🌅  Digest - oct_25_thoughts.md
=======================================================
Overview:
Synthesized 6 log lines into 5 primary action items. All items tracked locally without external cloud telemetry.

Action Items:
  [ ] TODO: Submit Hacktoberfest Open-Source AI Challenge Week 3 ("Slow and Steady")
  [ ] Review open pull requests on the repository
  [ ] Fix edge-case in JSON streaming response parser
  [ ] Prepare presentation deck for next week
  [ ] Walk the dog in the evening

Sloth Wisdom: "Slow and steady wins the race. Take a breath and let the machine do the heavy lifting."
=======================================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository:&lt;/strong&gt; [&lt;a href="https://github.com/rajJasani/sloth-tidy-ai" rel="noopener noreferrer"&gt;https://github.com/rajJasani/sloth-tidy-ai&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License:&lt;/strong&gt; Permissive open-source &lt;a href="https://opensource.org/licenses/MIT" rel="noopener noreferrer"&gt;MIT License&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to Run Locally
&lt;/h3&gt;

&lt;p&gt;SlothTidy AI is engineered using Python's standard library so you can run it out of the box with zero required &lt;code&gt;pip&lt;/code&gt; dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Clone the repository&lt;/span&gt;
git clone https://github.com/rajjasani/sloth-tidy-ai.git
&lt;span class="nb"&gt;cd &lt;/span&gt;sloth-tidy-ai

&lt;span class="c"&gt;# 2. (Optional) Run with your favorite open-weight model via Ollama&lt;/span&gt;
ollama pull gemma2:2b

&lt;span class="c"&gt;# 3. Check system status and local inference engine&lt;/span&gt;
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; sloth_ai.cli status

&lt;span class="c"&gt;# 4. Perform a dry-run tidy audit on sample files&lt;/span&gt;
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; sloth_ai.cli tidy &lt;span class="nt"&gt;--folder&lt;/span&gt; examples/inbox &lt;span class="nt"&gt;--dry-run&lt;/span&gt;

&lt;span class="c"&gt;# 5. Generate a morning digest&lt;/span&gt;
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; sloth_ai.cli digest &lt;span class="nt"&gt;--file&lt;/span&gt; examples/notes/oct_25_thoughts.md

&lt;span class="c"&gt;# 6. Launch the interactive Web Dashboard&lt;/span&gt;
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; sloth_ai.cli serve &lt;span class="nt"&gt;--port&lt;/span&gt; 8765
&lt;span class="c"&gt;# Open http://localhost:8765 in your browser&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;p&gt;SlothTidy AI was built from the ground up with clean modular architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dual-Core Local Inference Engine (&lt;code&gt;sloth_ai/core/engine.py&lt;/code&gt;)&lt;/strong&gt;: Seamlessly connects to local &lt;strong&gt;Ollama&lt;/strong&gt; instances (&lt;code&gt;gemma2:2b&lt;/code&gt;, &lt;code&gt;llama3.2&lt;/code&gt;, &lt;code&gt;qwen2.5&lt;/code&gt;) for semantic classification and natural language synthesis. If Ollama is offline, it gracefully falls back to a deterministic semantic rule parser so the application never breaks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage &amp;amp; Audit Layer (&lt;code&gt;sloth_ai/modules/storage.py&lt;/code&gt;)&lt;/strong&gt;: Uses embedded SQLite to track every organized file with SHA256 integrity checks, supporting audit logs and rollbacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ambient Tidier (&lt;code&gt;sloth_ai/modules/tidier.py&lt;/code&gt;)&lt;/strong&gt;: Reads file snippets safely, determines context, and relocates them into structured categorical directories (&lt;code&gt;work_projects&lt;/code&gt;, &lt;code&gt;finance_receipts&lt;/code&gt;, &lt;code&gt;developer_code&lt;/code&gt;, &lt;code&gt;learning_notes&lt;/code&gt;, &lt;code&gt;personal_archive&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Digest Synthesizer (&lt;code&gt;sloth_ai/modules/digest.py&lt;/code&gt;)&lt;/strong&gt;: Parses markdown logs, bullet points, and commit history into an actionable executive summary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Glassmorphic Web Interface (&lt;code&gt;sloth_ai/server/&lt;/code&gt;)&lt;/strong&gt;: Built with responsive vanilla JavaScript and CSS, delivering real-time status updates and audit controls without node build tools.&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;Absolute User Sovereignty &amp;amp; Privacy&lt;/strong&gt;: File tidying and daily diary summarization inherently touch sensitive documents (tax receipts, bank statements, proprietary code, personal thoughts). Sending this data to closed cloud APIs poses major privacy and security risks. Open-source AI ensures that intelligence happens directly on device where data lives.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Resilience &amp;amp; Zero Cost&lt;/strong&gt;: True ambient background automation should not stop when Wi-Fi drops, nor should it incur recurring pay-per-token API bills. Open-weight models empower users with limitless, resilient, local compute.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Freedom to Customize&lt;/strong&gt;: Open innovation allows developers and the community to inspect model prompts, modify categorization heuristics, fine-tune models on domain-specific files, and build custom workflows without corporate gatekeeping.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
    <item>
      <title>ContractGuard: Local-First Legal &amp; Scope Creep Auditor for Freelancers (Powered by Google Gemma)</title>
      <dc:creator>Raj Jasani</dc:creator>
      <pubDate>Sun, 18 Oct 2026 18:38:30 +0000</pubDate>
      <link>https://dev.to/rajjasani2008/contractguard-local-first-legal-scope-creep-auditor-for-freelancers-powered-by-google-gemma-6kg</link>
      <guid>https://dev.to/rajjasani2008/contractguard-local-first-legal-scope-creep-auditor-for-freelancers-powered-by-google-gemma-6kg</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &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;&lt;strong&gt;ContractGuard&lt;/strong&gt; is a sovereign, local-first legal auditor and scope creep defense engine built for freelancers, contract developers, designers, and agency solopreneurs. It is powered by &lt;strong&gt;Google Gemma open-weight models&lt;/strong&gt; (&lt;code&gt;gemma2:9b&lt;/code&gt; / &lt;code&gt;gemma2:2b&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Every year, independent contractors lose thousands of dollars to predatory clauses buried deep inside client Master Services Agreements (MSAs) and Statements of Work (SOWs). A single clause can trap a freelancer in a &lt;strong&gt;Net-90 payment delay&lt;/strong&gt;, force them to &lt;strong&gt;transfer their intellectual property before final payment clears&lt;/strong&gt;, or expose them to &lt;strong&gt;unlimited personal indemnification liability&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;ContractGuard solves this by auditing contracts against the &lt;strong&gt;Freelancer Fatal 7™&lt;/strong&gt; traps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Payment Terms &amp;amp; Cash Flow Traps:&lt;/strong&gt; Detects Net-60/90 terms, "pay-when-paid" clauses, and missing upfront deposits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Premature IP Assignment:&lt;/strong&gt; Ensures your copyright and IP only transfer &lt;em&gt;after&lt;/em&gt; full payment has cleared your bank account.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infinite Revisions &amp;amp; Scope Squeeze:&lt;/strong&gt; Flags subjective client satisfaction clauses and missing revision round caps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restrictive Covenants &amp;amp; Non-Competes:&lt;/strong&gt; Protects your freedom to take other clients in your specialty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unilateral Indemnification &amp;amp; Unlimited Liability:&lt;/strong&gt; Caps your liability at the contract fee paid, protecting your personal assets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unilateral Termination &amp;amp; Missing Kill Fees:&lt;/strong&gt; Guarantees you get paid for completed milestones plus an early termination fee.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unbounded Scope Control:&lt;/strong&gt; Requires a mutually signed Change Order before starting any out-of-scope work.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Beyond just scoring the risk, ContractGuard provides &lt;strong&gt;ready-to-use Redline Counter-Clauses&lt;/strong&gt; that freelancers can copy-paste straight into an email or contract redline document. &lt;/p&gt;

&lt;p&gt;Additionally, the &lt;strong&gt;Scope Creep Defender&lt;/strong&gt; turns out-of-scope client messages ("Can you also quickly build an admin dashboard before Monday?") into three polished responses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Diplomatic &amp;amp; Upsell (Recommended):&lt;/strong&gt; Validates the client's idea and quotes a paid addendum or Phase 2 sprint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Firm &amp;amp; Structured:&lt;/strong&gt; References agreed contract terms and requires a signed Change Order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick Boundary:&lt;/strong&gt; A polite postponement to protect the launch timeline.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Who Would Pay for It?
&lt;/h2&gt;

&lt;p&gt;Solo developers, designers, video editors, and independent consultants worldwide.&lt;/p&gt;

&lt;p&gt;When freelancers sign a new project, hiring a lawyer at $400–$600/hour to review a $4,000 SOW is financially impractical. Most freelancers simply cross their fingers and sign. When a dispute happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A late payment leaves them unable to pay rent for 90 days.&lt;/li&gt;
&lt;li&gt;A client demands 12 rounds of "minor tweaks" for free.&lt;/li&gt;
&lt;li&gt;A client cancels the project with 95% of the work done and pays $0.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A tool that costs &lt;strong&gt;$9/month&lt;/strong&gt; or &lt;strong&gt;$5/audit&lt;/strong&gt; that catches a single $3,000 trap pays for itself for decades. Unlike general chatbots where you have to manually prompt and risk hallucinations, ContractGuard evaluates the exact risk rubric, calculates an objective risk score (0-100), and provides industry-standard redline clauses.&lt;/p&gt;




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

&lt;p&gt;Here is the ContractGuard interface in action:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instant Sample Audits:&lt;/strong&gt; Test with pre-loaded high-risk developer SOWs, design contracts, or a fair gold-standard contract with 1 click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Risk Scorecard:&lt;/strong&gt; Immediate visual verdict with critical and warning indicators.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fatal 7 Breakdown:&lt;/strong&gt; Problematic clause quote, plain-English legal risk explanation, and 1-click copy redline counter-clause.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope Creep Response Generator:&lt;/strong&gt; 3 distinct tone variations to turn unbilled scope creep into paid revenue.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+-------------------------------------------------------------------------------+
|  ContractGuard AI                  Hacktoberfest 2026: Week 2 (Side Hustle)   |
+-------------------------------------------------------------------------------+
|  [Risk Score: 97/100 - CRITICAL RISK]   5 Fatal Traps Detected                |
|  Summary: High-risk contract. Contains terms that severely threaten cash flow.|
|                                                                               |
|  🚨 1. Payment Terms &amp;amp; Cash Flow Trap [CRITICAL]                              |
|     Clause: "Invoices submitted by Contractor subject to Net-90 terms..."     |
|     Risk: Forces you to act as an interest-free bank for 3 months.            |
|     Redline: "All invoices payable within Net-15 days. 50% deposit upfront..."|
|     [Copy Redline Counter-Clause]                                             |
|                                                                               |
|  🚨 2. Premature IP Assignment Trap [CRITICAL]                                |
|     Clause: "Assigns all rights unconditionally upon initial delivery..."     |
|     Risk: Strips away all leverage before final payment clears.               |
|     Redline: "IP rights transfer solely upon receipt of full payment..."      |
|     [Copy Redline Counter-Clause]                                             |
+-------------------------------------------------------------------------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;The complete source code is open-source under the MIT License on GitHub:&lt;/p&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/RajJasani" rel="noopener noreferrer"&gt;
        RajJasani
      &lt;/a&gt; / &lt;a href="https://github.com/RajJasani/contractguard" rel="noopener noreferrer"&gt;
        contractguard
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &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;ContractGuard AI 🛡️&lt;/h1&gt;
&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Local-First Contract &amp;amp; Scope Creep Auditor for Freelancers &amp;amp; Solopreneurs&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Built for &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12" rel="nofollow"&gt;Hacktoberfest 2026: Week 2 Open-Source AI Challenge (Side Hustle)&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Category: Overall Submission &amp;amp; Best Use of Gemma&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://dev.to/challenges/hf26" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/25647568c2750cae6876ea07b5c1003c1782ef9a279e9e540cc310743a4009ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4861636b746f626572666573742d323032362532305765656b253230322d4635423732363f7374796c653d666c6174266c6f676f3d6861636b746f62657266657374" alt="Hacktoberfest 2026"&gt;&lt;/a&gt;
&lt;a href="https://ai.google.dev/gemma" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/37f923c8ddd9f38d0f818e2e62347649119e49e45fa9cb91fa3095c34ab49027/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f64656c2d476f6f676c6525323047656d6d6125323032253230253246253230332d3338424446383f7374796c653d666c6174266c6f676f3d676f6f676c65" alt="Model"&gt;&lt;/a&gt;
&lt;a href="https://opensource.org/licenses/MIT" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/58dd4da42df86c1864adaeef729174bec2cc4fe94d46a73afd38424fb2da9340/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d656d6572616c642e737667" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://github.com/RajJasani/contractguard/tests/test_auditor.py" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/20b5e8731137d3ec778df86f5dede7bcba52497fe68e36f9a60bd35973652ccd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54657374732d31303025323525323050617373696e672d313042393831" alt="Tests"&gt;&lt;/a&gt;
&lt;a href="https://github.com/RajJasani" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/cfa0b9efbe9a71c5a8905e1402b3c8e330167556e9da76eb83a81260fc39d6a5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507269766163792d3130302532352532304c6f63616c253230496e666572656e63652d323536334542" alt="Privacy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;💡 Executive Summary&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Every year, solo developers, designers, and consultants lose thousands of dollars to sneaky clauses hidden inside client Master Services Agreements (MSAs) and Statements of Work (SOWs). From &lt;strong&gt;Net-90 payment delays&lt;/strong&gt; and &lt;strong&gt;premature IP assignment&lt;/strong&gt; to &lt;strong&gt;unlimited revisions&lt;/strong&gt; and &lt;strong&gt;unilateral indemnification&lt;/strong&gt;, clients regularly shift massive business risk onto unprotected solopreneurs.&lt;/p&gt;
&lt;p&gt;Freelancers cannot afford a $500/hour contract lawyer for a $5,000 project. But they also &lt;strong&gt;cannot paste confidential client contracts into proprietary closed cloud AI models without violating client NDAs&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ContractGuard AI&lt;/strong&gt; is a sovereign, local-first legal auditor and scope creep defense system powered by &lt;strong&gt;Google Gemma open-weight models&lt;/strong&gt; (&lt;code&gt;gemma2:9b&lt;/code&gt; / &lt;code&gt;gemma2:2b&lt;/code&gt;). It scans client contracts for the &lt;strong&gt;Freelancer Fatal 7™&lt;/strong&gt; traps, computes…&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/RajJasani/contractguard" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;🔗 &lt;strong&gt;Repository Link:&lt;/strong&gt; &lt;a href="https://github.com/RajJasani/contractguard" rel="noopener noreferrer"&gt;https://github.com/RajJasani/contractguard&lt;/a&gt;&lt;/p&gt;




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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open-Weight Model:&lt;/strong&gt; &lt;strong&gt;Google Gemma 2&lt;/strong&gt; (&lt;code&gt;gemma2:9b&lt;/code&gt; and &lt;code&gt;gemma2:2b&lt;/code&gt;) running via local Ollama or OpenAI-compatible inference servers (vLLM / llama.cpp).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid Dual-Engine Architecture:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;A deterministic legal pattern engine with high-precision regex extraction for instant, zero-latency detection of common trap formulations.&lt;/li&gt;
&lt;li&gt;Google Gemma's open-weight model provides contextual nuance, semantic risk synthesis, and dynamic scope creep email generation.&lt;/li&gt;
&lt;li&gt;Zero external npm/pip runtime dependencies for the core server (&lt;code&gt;server.py&lt;/code&gt;), running cleanly on Python's built-in standard library for instant execution.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Responsive, glassmorphic single-page app with native dark mode, tabbed navigation, 1-click clipboard integration, and real-time state management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing:&lt;/strong&gt; Comprehensive automated test suite (&lt;code&gt;tests/test_auditor.py&lt;/code&gt;) validating trap detections across real-world freelance agreements.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  System Architecture Diagram
&lt;/h3&gt;



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    A[Freelancer Contract / SOW Text] --&amp;gt; B[ContractGuard Web Interface]
    B --&amp;gt; C[ContractGuard REST API]

    subgraph Engine[Dual-Engine Processing Core]
        C --&amp;gt; D[Deterministic Legal Pattern Engine]
        C --&amp;gt; E[Google Gemma 2 Open-Weight Model\nLocal Ollama / vLLM]
        D --&amp;gt; F[Freelancer Fatal 7 Evaluator]
        E --&amp;gt; F
    end

    F --&amp;gt; G[0-100 Risk Scorecard]
    F --&amp;gt; H[Legal Exposure Explanation]
    F --&amp;gt; I[1-Click Redline Counter-Clauses]

    J[Client Scope Creep Request] --&amp;gt; K[Scope Creep Defender]
    K --&amp;gt; L[3 Polished Boundary Emails:\n1. Diplomatic &amp;amp; Upsell\n2. Firm Change Order\n3. Quick Boundary]&lt;/code&gt;&lt;/pre&gt;






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

&lt;p&gt;In this week's challenge, DEV asks: &lt;em&gt;Why does open innovation matter for what you built?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For a legal tool protecting solopreneurs, open innovation is not a stylistic choice — it is an existential business necessity:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Client Confidentiality &amp;amp; Non-Disclosure (NDA) Compliance:&lt;/strong&gt;
Freelance contracts contain non-public rates, client roadmap features, and strict NDAs. Uploading these documents to closed, proprietary cloud AI platforms risks violating client confidentiality and breaching your contract. With open-weight models like &lt;strong&gt;Google Gemma&lt;/strong&gt;, inference runs locally on the freelancer's laptop. &lt;strong&gt;Client data never leaves the device.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Economic Viability (90%+ Gross Margin for the Side Hustle):&lt;/strong&gt;
If you charge $9/month or $5/audit, closed API providers charging per token would devour your revenue on multi-page SOWs. By running Gemma locally or on low-cost shared GPU instances, marginal serving costs are near zero, creating a sustainable 90%+ gross margin micro-SaaS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Vendor Lock-In or Sudden Deprecations:&lt;/strong&gt;
Proprietary APIs change pricing, apply unpredictable content filters, or deprecate models without warning. With an open-weight model, the weights belong to the creator forever.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Freedom:&lt;/strong&gt;
Freelancers frequently work from airplanes, trains, or coffee shops without reliable Wi-Fi. ContractGuard runs completely offline.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PDF &amp;amp; DOCX Drag-and-Drop:&lt;/strong&gt; Adding in-browser client-side OCR for direct PDF contract uploads without third-party services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jurisdiction-Specific Modules:&lt;/strong&gt; Fine-tuning Gemma on specific legal statutes such as the NYC Freelance Isn't Free Act and California AB5 contractor laws.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contract Diff Viewer:&lt;/strong&gt; Visual side-by-side redline comparison showing the original contract next to the negotiated version.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Thank you to the DEV and MLH teams, and to DigitalOcean, Google Gemma, and Hacktoberfest for organizing this challenge!&lt;/em&gt;&lt;/p&gt;

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