跳到正文
DEV Community· Tanishq Wankhede·· 3 小時前AI 評分32

SlothDesk AI:由 Google Gemma 2 驅動的防倦怠桌面工作套件

SlothDesk AI: The Anti-Burnout Desktop Operating Suite That Rewards Laziness (Powered by Google Gemma 2)

AI 導讀

SlothDesk AI 是一套由 Google Gemma 2 開放權重模型驅動的本機優先防倦怠桌面工作套件,提供 SlothDigest、SlothReply、SlothSort 和 SlothSanctuary 四項功能。它可整理聊天摘要及檔案、草擬回覆,並離線合成睡前音訊;專案以 MIT License 開源。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady


What I Built

Tomorrow, October 20, is International Sloth Day. In modern developer culture, sloths are often misunderstood as "lazy." In evolutionary biology, however, sloths (Bradypus tridactylus) represent nature’s ultimate endurance masters:

  • They move at 0.15 miles per hour.
  • They conserve over 90% of their metabolic energy compared to typical mammals of their size.
  • They nurture symbiotic green algae in their fur that camouflages them and synthesizes micronutrients without burning calories.
  • They never hurry, never overthink, and outlast faster predators.

Meanwhile, in our digital workdays, developers, freelancers, and knowledge workers waste up to 70% of their daily cognitive energy on low-value, anxiety-inducing digital friction:

  1. Sifting through 200+ unread messages across Slack, Discord, and family WhatsApp groups just to discover: "Is anyone actually waiting on me?"
  2. Agonizing over how to politely push back on unnecessary 45-minute synchronous Zoom syncs and weekend "quick favors."
  3. Staring hopelessly at a chaotic desktop or Downloads folder holding 400 unsorted screenshots, invoices, tax forms, and vague exports.
  4. Tossing in bed at midnight with racing thoughts because the workday never formally decelerated.

Enter SlothDesk AI 🦥

I built SlothDesk AI, a 100% local-first, anti-burnout desktop operating suite powered by Google Gemma 2 open weights. It automates the cognitive chores you dread, allowing you to move at your own pace, conserve your mental output, and protect your calendar peace.

                           ┌──────────────────────────────────────────────┐
                           │               🦥 SlothDesk AI                │
                           │   Local-First Anti-Burnout Desktop System    │
                           └──────────────────────┬───────────────────────┘
                                                  │
          ┌───────────────────┬───────────────────┴───────────────────┬───────────────────┐
          ▼                   ▼                                       ▼                   ▼
  ┌───────────────┐   ┌───────────────┐                       ┌───────────────┐   ┌───────────────┐
  │  SlothDigest  │   │  SlothReply   │                       │   SlothSort   │   │SlothSanctuary │
  │ 60-Sec Brief &│   │  Low-Energy   │                       │  Auto-Folder  │   │Offline Audio  │
  │ 1-Click Reply │   │ Boundary Wall │                       │& Script Maker │   │& Bedtime Story│
  └───────┬───────┘   └───────┬───────┘                       └───────┬───────┘   └───────┬───────┘
          │                   │                                       │                   │
          └───────────────────┴───────────────────┬───────────────────┴───────────────────┘
                                                  │
                                                  ▼
                                      ┌───────────────────────┐
                                      │   Gemma Engine Core   │
                                      │  Turn Token Formatter │
                                      └───────────┬───────────┘
                                                  │
                         ┌────────────────────────┴────────────────────────┐
                         ▼                                                 ▼
            ┌───────────────────────────┐                     ┌───────────────────────────┐
            │    Local Ollama / vLLM    │                     │   Deterministic Heuristic │
            │  gemma2:2b / gemma2:9b    │                     │      Replica (0ms Fallback)│
            │   (Offline Local Model)   │                     │  (Zero-Dependency Guard)  │
            └───────────────────────────┘                     └───────────────────────────┘

The Four Sloth Modules:

  1. SlothDigest (Overnight Chat & Thread Synthesizer):

    • Dumps raw chat logs or email chains from Slack, Discord, or WhatsApp.
    • Gemma 2 distills them into The 60-Second Truth (2–3 blunt bullet points of actual signal), flags Who is waiting on you with urgency ratings, and provides 1-Click Lazy Replies you can copy and send without typing.
  2. SlothReply (Diplomatic Low-Energy Boundary Drafter):

    • Takes incoming meeting requests or weekend favor demands.
    • Lets you choose your Energy Conservation Level (Minimalist, Courteous Zen, or Ironclad Perimeter).
    • Gemma 2 drafts polite, guilt-free responses that convert 45-minute synchronous meetings into 2-bullet async updates, backed by an explanatory Sloth Principle.
  3. SlothSort (Zero-Effort Clutter & File Tamer):

    • Takes unorganized lists of files (Screenshot 2026-10-18 at 11.42.09.png, uber_receipt_oct.pdf, contract_draft_v2.docx).
    • Automatically clusters them into logical directories (01-Finance, 02-Legal, 03-Design, 04-Engineering, 05-Notes) and suggests normalized ISO-dated names (2026-10-25-receipt-uber-transport.pdf).
    • Generates executable 1-Click PowerShell & Bash terminal cleanup scripts so your machine sorts itself in 1 second.
  4. SlothSanctuary (Offline Bedtime Fables & Ambient Audio Synthesizer):

    • 100% Procedural Web Audio API Synthesizer: Directly synthesizes pink noise rain (Monteverde Rain), slow LFO wind (Canopy Breeze), stochastic fireplace sparks (Hearthside Crackle), and 432Hz pure sine binaural tones (Alpha Calm Drone) in real-time in the browser with zero MP3 downloads and zero network bandwidth.
    • Bedtime Micro-Fables: Slow-cadence, low-stimulus bedtime stories generated by Gemma 2, calibrated specifically to reduce resting heart rate to 42–48 BPM and release mental tension.

Demo

The user interface was built with strict art direction to reject generic AI SaaS clichés:

  • Warm Alabaster Canvas (#FAF8F5) and Carbon Ink (#1C1917) paired with organic Botanical Forest Moss (#2B4C38) and Warm Ochre (#B45309).
  • Swiss typographic hierarchy pairing Fraunces editorial serif with Plus Jakarta Sans and JetBrains Mono.
  • Interactive tactile workspaces with 1-click presets for immediate exploration.

Live Local Experience:

  • Runs locally at http://localhost:3000 with instant response times.
  • Features dynamic metabolic counters: Minutes Conserved, Awkward Syncs Avoided, Files Auto-Organized, and Sloth Peace Index (98.4%).
  • Procedural audio synthesizer works completely offline with real-time individual channel sliders.

Code

The entire codebase is free and open-source under the MIT License:

🔗 GitHub Repository: https://github.com/tanishq4220/slothdesk-ai

Tech Stack:

  • Model Engine: Google Gemma 2 (gemma2:2b / gemma2:9b) open-weight LLM
  • Inference Harness: Native Gemma 2 turn formatter (<start_of_turn>user ... <end_of_turn>) with local Ollama/vLLM integration and zero-latency deterministic heuristic replica
  • Runtime: Node.js v24, Express, Native Fetch
  • Frontend: Clean vanilla JavaScript SPA, custom CSS design system, HTML5 Web Audio API
  • Testing: Built-in Node test runner (node:test, node:assert) with 100% passing test coverage

Running the Test Suite:

npm test
✔ GemmaEngine formats official Gemma 2 instruction tokens (0.93ms)
✔ DigestEngine compresses unread engineering slack logs into actionable signals (41.29ms)
✔ ReplyEngine drafts polite async deferral for 45-min Zoom request (3.69ms)
✔ SortEngine organizes messy files into categorized taxonomy and generates scripts (3.91ms)
✔ SanctuaryEngine generates low-cadence bedtime micro-fable for International Sloth Day (4.03ms)
ℹ tests 5, pass 5, fail 0

How I Built It

SlothDesk AI is built around Google's open-weight Gemma 2 architecture:

1. Gemma 2 Turn Formatting & Prompt Engineering

In src/engine/gemma.js, every agent call is wrapped strictly within Gemma 2's instruction format:

export class GemmaEngine {
  formatGemma2Prompt(systemContext, userPrompt) {
    return `<start_of_turn>user\n${systemContext}\n\n${userPrompt}<end_of_turn>\n<start_of_turn>model\n`;
  }
}

This strict structuring prevents prompt drift, eliminates conversational filler, and ensures Gemma 2 outputs crisp, structured JSON or concise bullet points.

2. Dual-Engine Resilience

SlothDesk connects automatically to your local Ollama instance (http://127.0.0.1:11434) running gemma2:2b. If the user is on a lightweight laptop without Ollama running, SlothDesk's internal deterministic replica seamlessly handles all operations with 0ms latency, ensuring the user experience never degrades.

3. Procedural Offline Web Audio API Synthesizer

Rather than streaming heavy MP3 files, public/app.js synthesizes sounds mathematically:

  • Rain: Pink noise algorithm filtered through a dynamic 850Hz low-pass BiquadFilterNode.
  • Canopy Wind: Bandpass filter modulated by a 0.12 Hz LFO oscillator simulating a slow 8-second treetop breeze.
  • Fire: Periodic stochastic triangle wave impulses with exponential decay curves mimicking burning embers.
  • 432Hz Drone: Dual pure sine oscillators tuned to 108Hz and 109.5Hz creating a gentle 1.5Hz binaural alpha-wave beat.

Why Does Open Innovation Matter?

Open-weight models like Google Gemma 2 are essential for this project:

1. Confidentiality & Zero Cloud Byte Leakage

Unread Slack threads, personal group chats, and desktop files contain client names, tax numbers, and proprietary discussions. Sending these to closed commercial cloud APIs (OpenAI, Anthropic) risks data leakage and violates client NDAs. With Gemma 2 running locally on your laptop, zero bytes ever touch an external server.

2. $0.00 Runtime Overhead

Commercial APIs charge per thousand tokens. Ingesting a 50-message chat transcript easily consumes 4,000+ tokens. Running this three times a day would cost $15–$30/month on cloud APIs. With open weights, the marginal cost of running SlothDesk is literally $0.00.

3. Freedom From Subscriptions and Vendor Lock-In

Closed APIs frequently deprecate endpoints, enforce rate limits, or adjust pricing. Open-weight AI provides permanent, unconstrained ownership of your intelligence tools.


My Agent Session

I developed, tested, and verified SlothDesk AI with the assistance of DevRelay:


The Lazy Payoff

Here is what SlothDesk AI saves in real, measurable numbers:

  • 14 minutes saved every morning by reading a 3-bullet SlothDigest instead of 40 Slack messages.
  • 60 minutes of uninterrupted focus conserved by converting a 45-minute sync into an async Slack note.
  • 35 minutes of tedious file dragging avoided using the 1-click PowerShell cleanup script.
  • Total conservative daily savings: ~109 minutes of mental energy and focus preserved.

Prize Categories

  • Best Use of Gemma ($200 Featured Category): Purpose-built around Google's open-weight Gemma 2 model (gemma2:2b / 9b), utilizing Gemma 2 turn tokens (<start_of_turn>user ... <end_of_turn>), local inference, and privacy-preserving offline reasoning.
  • Overall Winner ($250): A unique, production-grade, beautifully art-directed tool honoring International Sloth Day and Sloan the Sloth, solving digital burnout through open innovation.

Built with 🦥 for Hacktoberfest 2026. Conserve your energy. The canopy will still be here tomorrow.

來源:DEV Community · dev.to