惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
量子位
雷峰网
雷峰网
宝玉的分享
宝玉的分享
V
Visual Studio Blog
博客园_首页
小众软件
小众软件
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
dwriter: An AI-augmented terminal-based journaling tool t...
Ryan · 2026-05-09 · via DEV Community

Ryan

Gemma 4 Challenge: Build With Gemma 4 Submission

This is a submission for the Gemma 4 Challenge: Build with Gemma 4

What I Built

dwriter is a minimalist, terminal-first journaling and productivity tool designed to jot down fleeting thoughts or important notes without leaving your terminal, effectively solving "logging friction" through a zero-latency capture system and a rich, AI-augmented reflection layer. It features an interactive AI 2nd-Brain that understands your entire work history via a dual-model reasoning pipeline and a closed learning loop that automatically extracts durable facts—such as preferences, goals, and recurring constraints—to build a persistent personal knowledge base. This agentic ReAct pipeline allows the AI to go beyond simple chat by using tools to search your journal, tasks, and Git history for grounded, data-driven answers. Under the hood, the tool employs graph indexing using LadybugDB alongside SQLite to power complex relationship queries and high-speed full-text searches. Data remains private and accessible across devices through a local-first, Git-backed synchronization engine utilizing Lamport clocks for conflict resolution, while seamless Obsidian integration allows you to export AI-generated standups, weekly retros, and burnout checks directly to your vault as Markdown.

Screenshots

2nd-Brain's Insight Hub
Follow-Up Screen
Timer
Reports Screen

Code

dwriter (AI-Edition)

How I Used Gemma 4

To achieve the perfect balance between reasoning depth and terminal-speed performance, I implemented a Dual-Model AI Pipeline using the Gemma 4 family. This architecture is critical because it prevents the "intelligence latency" that typically plagues local LLM integrations. By decoupling interactive reasoning from background processing, dwriter remains responsive while building a deeply indexed personal knowledge base.

  1. Gemma 4 E4B (4B Dense) — The "Main Brain"
    The Main Brain is responsible for high-stakes reasoning and interactive synthesis. It powers the "2nd-Brain" chat and generates complex analytical reports like Weekly Retrospectives and Burnout Assessments.

    • The Agentic ReAct Loop: Instead of simple text completion, the E4B model operates via a Reason + Act (ReAct) pipeline. When you ask a question, it reasons about your intent, selects the appropriate tool (e.g., run_cypher, fetch_recent_commits, or search_facts), and synthesizes the raw data into a grounded, professional response.
    • Context Synthesis: Its higher reasoning density allows it to merge multiple streams of context—your journal, git history, and tasks—to identify subtle trends and provide data-driven advice.
  2. Gemma 4 E2B (2B Dense) — The "Daemon"
    The Daemon handles the high-frequency, structured extraction tasks that happen silently in the background. In a terminal environment, speed is a dealbreaker; the E2B model is optimized for near-instant execution.

    • The Closed Learning Loop: Every time you save an entry, the Daemon performs Fact Extraction and Semantic Auto-Tagging. It identifies "Durable Facts"—preferences, long-term goals, and recurring constraints—and projects them into the graph index.
    • Recursive Summarization: It works in the background to summarize long-term history, ensuring that your "2nd Brain" maintains a compressed yet accurate map of your progress without causing UI stutters or interrupting your flow.

To learn more, visit: The 2nd-Brain Guide

Local-First Privacy & Persistence

By running this dual-model pipeline locally, dwriter transforms from a simple log file into a Living Knowledge Base. The Daemon constantly refines your personal fact graph, which the Main Brain then uses to provide uniquely tailored insights. Because everything stays on your machine, your most sensitive thoughts and work logs remain entirely private, gaining intelligence with every entry you write.

Project author: Rhaeyyan