Skip to content

Repository files navigation

🌿 DevWell - Proactive AI Health Companion for Developers

An MCP-powered health companion that evaluates your wellness context on every AI interaction and injects proactive coaching through MCP tools and Kiro hooks, so you do not have to ask for reminders.

License: MIT Node.js MCP Autonomous

Live site Β· Watch the demo


🎯 Problem

Developers spend 6-10+ hours daily at their desks, leading to:

  • πŸ₯€ Dehydration from forgetting to drink water (impairs cognitive function by 15-25%)
  • πŸ’Ί Musculoskeletal issues from prolonged sitting (back pain, RSI, tech neck)
  • πŸ• Poor nutrition from skipped meals and excess caffeine
  • 🧠 Mental fatigue & burnout from continuous focus without mindfulness breaks
  • πŸ‘οΈ Eye strain affecting 50-90% of computer workers

These issues directly reduce code quality, problem-solving ability, and long-term health.

πŸ’‘ Solution

DevWell is an MCP server that plugs into your AI coding workflow and adds proactive health coaching, powered by your existing AI subscription. It evaluates your health context on every AI interaction and through Kiro hooks, so you do not have to ask for reminders. Once configured, it:

  • πŸ€– Proactive on every interaction - evaluates your health context whenever your AI tool calls it or a Kiro hook fires, then injects coaching without you asking
  • 🧠 Learns over time - tracks which hours and intervention types you respond to. It surfaces correlations once it has enough days of data
  • πŸ“Š Tracks analytics - trends, burnout signals, productivity phases and correlations, all computed from your real history
  • 🎯 Respects your flow - protects deep focus, only interrupts when critical
  • ⚑ Zero extra cost - powered by your existing AI tool's subscription or gateway

πŸ”Œ Install it into your coding tool (Kiro first)

DevWell runs inside your AI coding tool, not a second terminal. It is built for Kiro and also works in Claude Code and Codex.

Kiro (its home)

DevWell is a Kiro plugin. Its .kiro/ directory is the whole config: .kiro/settings/mcp.json loads the bundled MCP server (34 tools, nothing to build), .kiro/hooks/ make it proactive (a SessionStart health companion and a PostToolUse nudge), .kiro/agents/wellness-coach.md is the coaching voice and .kiro/specs/ are the specs it was built from. Open the repo in Kiro, or point your Kiro MCP config at node /ABSOLUTE/PATH/TO/devwell/plugin/devwell-mcp.cjs.

Claude Code (one-step install)

/plugin marketplace add zkasuran/devwell
/plugin install devwell@devwell

That is it. DevWell is now inside Claude Code:

  • 34 MCP tools, so you log and check health by asking (for example "log 2 waters" or "how is my health").
  • Slash commands: /devwell:checkin, /devwell:water, /devwell:break, /devwell:meditate.
  • Two hooks: a SessionStart hook hands the assistant your health context, a UserPromptSubmit hook injects a nudge only when something is due, so reminders arrive in your flow without you asking.
  • The wellness-coach agent for a dedicated coaching voice.

The plugin bundles a self-contained server (plugin/devwell-mcp.cjs), so there is nothing to build after installing. For an always-visible badge, optionally add a status line to your Claude Code settings.json:

{ "statusLine": { "type": "command", "command": "node /ABSOLUTE/PATH/TO/devwell/plugin/devwell-cli.cjs statusline" } }

Codex

DevWell runs in OpenAI Codex as a plain MCP server too. See the MCP configuration under Quick Start below.

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ (download)
  • One of: Kiro CLI, Claude Code (claude), or any MCP-compatible tool

Installation

# Clone the repository
git clone https://github.com/zkasuran/devwell.git
cd devwell

# Install dependencies
npm install

# Build the project
npm run build

# Verify it works
node dist/cli.js help

Configure with Your AI Tool

Kiro CLI / Kiro IDE

Add to your MCP configuration (.kiro/settings/mcp.json or via Kiro settings):

{
  "mcpServers": {
    "devwell": {
      "command": "node",
      "args": ["/absolute/path/to/devwell/dist/index.js"],
      "env": {}
    }
  }
}

Claude Code (claude CLI)

Add to your Claude Code MCP settings (~/.claude/settings.json):

{
  "mcpServers": {
    "devwell": {
      "command": "node",
      "args": ["/absolute/path/to/devwell/dist/index.js"]
    }
  }
}

OpenAI Codex CLI

Add to your Codex MCP configuration:

{
  "mcpServers": {
    "devwell": {
      "command": "node",
      "args": ["/absolute/path/to/devwell/dist/index.js"]
    }
  }
}

Run it inside your coding CLI (not another terminal)

The point of DevWell is not a separate devwell window you remember to open. It lives inside the tool you already code in, in two ways.

A status line that is always glanceable. devwell statusline prints a one-line health badge:

[πŸ’§5/8 | πŸƒ45m | β˜•0mg | 😌 | 🌟80pts]

Wire it into Claude Code's status line and your hydration, sitting time, caffeine, stress and health score sit at the bottom of the CLI, no extra window.

Hooks that let the assistant nudge you in your flow. devwell nudge prints a short reminder only when something is due, and nothing otherwise, so it never adds noise. devwell context prints the coaching context. Fire them from Claude Code hooks so the assistant raises health in context without you asking.

Ready-to-paste Claude Code config is in integrations/claude-code/settings.json (swap in your absolute path):

{
  "statusLine": { "type": "command", "command": "node /ABS/devwell/dist/cli.js statusline" },
  "hooks": {
    "SessionStart": [{ "hooks": [{ "type": "command", "command": "node /ABS/devwell/dist/cli.js context" }] }],
    "UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "node /ABS/devwell/dist/cli.js nudge" }] }]
  }
}

On Kiro, the same proactive behavior comes from the agent hooks in .kiro/hooks/ (a SessionStart and PostToolUse health hook plus a UserPromptSubmit monitor). On Codex or any MCP client, the assistant calls the DevWell tools and appends the health badge to its responses.

First Use

Once configured, just tell your AI tool:

"Activate DevWell autonomous mode"

That's it. DevWell will:

  1. Set up your health profile with sensible defaults
  2. Begin autonomous monitoring immediately
  3. Learn your patterns over time
  4. Intervene at optimal moments
  5. Get better every day

Or customize first:

"Set up my DevWell health profile"
"Configure DevWell autonomous mode - I prefer minimal interruptions"

πŸ€– Autonomous Operation

How It Works

DevWell evaluates your health on every AI interaction rather than on a background timer. There is no separate daemon: each time your AI tool calls a DevWell tool or a Kiro hook fires, the engine checks your state and can weave in coaching. Once enabled:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          You code normally. DevWell handles the rest.     β”‚
β”‚                                                         β”‚
β”‚  Every AI interaction β†’ Autonomous evaluation            β”‚
β”‚  Health overdue?      β†’ AI naturally reminds you         β”‚
β”‚  Pattern detected?    β†’ Strategy adapts automatically    β”‚
β”‚  Burnout risk?        β†’ Proactive intervention           β”‚
β”‚  Everything fine?     β†’ Silent, invisible                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The Self-Improvement Loop

Your Activity β†’ Record Pattern β†’ Analyze β†’ Adapt Strategy β†’ Better Intervention
      ↑                                                            β”‚
      └──────── You Follow/Ignore β†’ Feedback Loop β†β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

DevWell continuously:

  1. Records when/how it intervenes and whether you respond
  2. Learns which hours, phases, and styles get the best response from you
  3. Adjusts intervention timing, frequency, and messaging
  4. Correlates health behaviors with productivity (water vs focus, breaks vs output) once it has enough days of data
  5. Predicts optimal behaviors based on your accumulated data

Productivity Phase Detection

Phase Duration DevWell Behavior
🟒 warming_up 0-15 min Silent - let you settle in
πŸ”΅ building_focus 15-45 min Only urgent health items
🟣 deep_flow 45-90 min PROTECTED - critical only
🟑 sustained 90-120 min Gentle reminders OK
🟠 declining 120-180 min Proactive suggestions
πŸ”΄ fatigued 180+ min Active intervention

AI Gateway Integration

DevWell uses your existing AI subscription - no extra API costs:

  • Kiro: System prompts + hooks inject health coaching context
  • Claude Code: a status line health badge plus SessionStart and UserPromptSubmit hooks (see "Run it inside your coding CLI")
  • Codex: Tool calls automatically trigger health evaluation

The AI naturally becomes your health companion through context injection.

Burnout Detection

Multi-factor burnout risk scoring:

  • Session duration (how long without proper breaks)
  • Break deficiency (missed vs. expected breaks)
  • Stress accumulation (tracked over days/weeks)
  • Health score decline (pattern degradation)
  • Productivity phase (fatigue signals)

When risk is HIGH or CRITICAL, DevWell will strongly encourage you to stop.

πŸ“‹ Features

πŸ’§ Hydration Tracking

  • Configurable daily water goal (default: 8 glasses)
  • Customizable reminder intervals (default: 60 minutes)
  • Visual progress bars with emoji indicators
  • Evidence-based hydration tips
  • Smart reminders based on time since last drink

πŸƒ Exercise & Movement

  • 18 exercises across 8 categories:
    • Stretching | Desk exercises | Standing | Walking
    • Eye care | Posture | Strength | Light cardio
  • Exercises tailored to your work style
  • Step-by-step instructions with proper form guidance
  • Physical limitation filtering
  • 20-20-20 eye care rule integration
  • Urgency escalation for prolonged sitting

πŸ₯— Nutrition & Brain Food

  • 18 food suggestions organized by time of day
  • Brain boost ratings (1-5 stars) based on cognitive science
  • Meal and snack logging with schedule awareness
  • Caffeine tracking with daily limits and cutoff times
  • Dietary restriction support (vegetarian, vegan, gluten-free, etc.)
  • Cooking willingness consideration (prep time filtering)

🧘 Mindfulness & Meditation

  • 15 guided meditation techniques across 9 categories:
    • Breathing | Body scan | Visualization | Mindful coding
    • Micro-meditation | Walking meditation | Focus reset
    • Gratitude | Progressive relaxation
  • Work-style-aware recommendations
  • Stress level tracking with responsive suggestions
  • Beginner to advanced difficulty levels
  • Developer-specific techniques (e.g., "Code Architecture Visualization")

πŸ“Š Statistics & Gamification

  • Real-time health score (0-100)
  • Daily statistics tracking
  • Weekly trend reports with improvement suggestions
  • Streak tracking for consistency motivation
  • Per-category goal progress

βš™οΈ Personalization

  • 7 work styles with tailored recommendations
  • Complete preference customization
  • Persistent profile across sessions
  • Working hours awareness

πŸ› οΈ All MCP Tools (34 Total)

πŸ€– Autonomous System

Tool Description
check_health Autonomous health snapshot with AI analysis & burnout detection
autonomous_status View autonomous engine status & next planned action
configure_autonomous Configure intervention style, flow protection, quiet hours
get_coaching_context Get AI coaching system prompt (powers autonomous behavior)
adaptive_insights View learned patterns, responsiveness, correlations
analytics_dashboard Full analytics: trends, heatmaps, predictions, milestones
burnout_assessment Detailed burnout risk with contributing factors
record_health_action Train the AI - record if you followed a recommendation

πŸ’§ Hydration

Tool Description
log_water Log water intake (feeds adaptive learning)
water_status View hydration progress

πŸƒ Movement

Tool Description
log_break Log break (feeds adaptive learning)
suggest_exercise AI-personalized exercise for your phase & style
movement_status Sitting analytics with autonomous scheduling

πŸ₯— Nutrition

Tool Description
log_meal Log meal (system learns patterns)
log_caffeine Track caffeine for sleep analysis
suggest_nutrition AI-powered brain food suggestion
nutrition_status Meal timing & caffeine analytics

🧘 Mindfulness

Tool Description
log_meditation Log meditation (correlated with stress/productivity)
suggest_meditation AI-selected technique for your phase & stress
mindfulness_status Stress & mindfulness analytics
set_stress_level Report stress (system adapts interventions)

βš™οΈ Profile & Stats

Tool Description
get_profile View profile with autonomous preferences
set_work_style Change work style (adapts all recommendations)
update_preferences Update any health preference
session_info Session with productivity phase detection
daily_stats AI-generated daily insights
weekly_report Trend analysis with coaching
pause_session / resume_session Control autonomous monitoring

⚑ Smart Notifications & Quick Actions

Tool Description
quick Ultra-fast health action via shortcodes (w, b, m, c, ok, skip, ...)
shortcodes Show all available quick-action shortcodes
health_badge Compact one-line health status badge to append to any response
notification_settings Configure notification mode, DND hours, frequency, compact mode
tracking_report Event tracking analytics: actions logged, response rates, patterns

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        AI Tool (Kiro / Claude / Codex)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚ MCP (stdio)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              DevWell MCP Server              β”‚
β”‚                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚         Session Manager              β”‚   β”‚
β”‚  β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚     β”‚      β”‚      β”‚      β”‚                  β”‚
β”‚  β”Œβ”€β”€β–Όβ”€β”€β”β”Œβ”€β”€β–Όβ”€β”€β”β”Œβ”€β”€β–Όβ”€β”€β”β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”            β”‚
β”‚  β”‚Waterβ”‚β”‚Move β”‚β”‚Food β”‚β”‚Meditaβ”‚            β”‚
β”‚  β”‚Trackβ”‚β”‚Trackβ”‚β”‚Trackβ”‚β”‚tion  β”‚            β”‚
β”‚  β””β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”˜            β”‚
β”‚     β”‚      β”‚      β”‚      β”‚                  β”‚
β”‚  β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚    Profile + Stats (Persistence)     β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

devwell/
β”œβ”€β”€ .kiro/                    # Kiro configuration
β”‚   β”œβ”€β”€ specs/                # Feature specifications
β”‚   β”‚   β”œβ”€β”€ devwell-health-mcp.md
β”‚   β”‚   β”œβ”€β”€ hydration-module.md
β”‚   β”‚   β”œβ”€β”€ movement-module.md
β”‚   β”‚   β”œβ”€β”€ nutrition-module.md
β”‚   β”‚   └── mindfulness-module.md
β”‚   β”œβ”€β”€ steering/             # Development guidelines
β”‚   β”‚   β”œβ”€β”€ project-conventions.md
β”‚   β”‚   β”œβ”€β”€ mcp-protocol-guidelines.md
β”‚   β”‚   └── health-science.md
β”‚   └── hooks/                # Automated hooks
β”‚       β”œβ”€β”€ pre-commit-lint.json
β”‚       β”œβ”€β”€ test-on-change.json
β”‚       β”œβ”€β”€ health-reminder.json
β”‚       └── build-check.json
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/                 # Core engine
β”‚   β”‚   β”œβ”€β”€ types.ts          # All TypeScript interfaces
β”‚   β”‚   β”œβ”€β”€ session-manager.ts
β”‚   β”‚   β”œβ”€β”€ profile-manager.ts
β”‚   β”‚   └── stats-manager.ts
β”‚   β”œβ”€β”€ modules/              # Health modules
β”‚   β”‚   β”œβ”€β”€ hydration.ts
β”‚   β”‚   β”œβ”€β”€ movement.ts
β”‚   β”‚   β”œβ”€β”€ nutrition.ts
β”‚   β”‚   └── mindfulness.ts
β”‚   β”œβ”€β”€ mcp/                  # MCP server layer
β”‚   β”‚   └── server.ts
β”‚   β”œβ”€β”€ data/                 # Health databases
β”‚   β”‚   β”œβ”€β”€ exercises.ts      # 18 exercises
β”‚   β”‚   β”œβ”€β”€ nutrition.ts      # 18 food suggestions
β”‚   β”‚   └── meditations.ts    # 15 techniques
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── paths.ts
β”‚   β”œβ”€β”€ index.ts              # MCP server entry
β”‚   └── cli.ts                # CLI entry
β”œβ”€β”€ tests/                    # Test suite
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

πŸ§ͺ Testing

# Run all tests
npm test

# Build and verify
npm run build

# Test CLI directly
node dist/cli.js status
node dist/cli.js water 1
node dist/cli.js exercise
node dist/cli.js meditate

# In-CLI integration commands
node dist/cli.js statusline   # one-line health badge for a CLI status line
node dist/cli.js nudge        # a proactive reminder, printed only when one is due
node dist/cli.js context      # the coaching context for a SessionStart hook

πŸ”§ Configuration

Environment Variables

Variable Description Default
DEVWELL_DATA_DIR Custom data storage path Platform-specific
DEVWELL_CONFIG_DIR Custom config path Platform-specific

Data Storage Paths

Platform Data Directory
Linux ~/.local/share/devwell/
macOS ~/Library/Application Support/devwell/
Windows %APPDATA%/devwell/

Customizable Preferences

Water goal: 1-20 glasses/day
Water reminder: 15-120 minutes
Break interval: 15-120 minutes
Exercise intensity: light / moderate / vigorous
Caffeine limit: 0-600mg/day
Caffeine cutoff: any hour
Meditation duration: 1-30 minutes
Dietary restrictions: vegetarian, vegan, gluten_free, dairy_free, nut_free, low_sugar, high_protein, keto, paleo
Work style: deep_focus, pomodoro, collaborative, creative, debugging, review, learning

🎨 How Kiro Was Used

DevWell was built entirely using Kiro, leveraging:

  1. Spec-Driven Development: All features were first defined as specifications in .kiro/specs/ before implementation. The main spec defined the architecture, module-level specs defined each health domain, and the autonomous engine spec drove the self-improving AI system.

  2. Steering Files: Development conventions, MCP protocol guidelines, and health science references in .kiro/steering/ ensured consistent code quality, evidence-based recommendations, and proper autonomous behavior.

  3. Agent Hooks:

    • SessionStart hook activates autonomous health monitoring
    • UserPromptSubmit hook injects health context into every interaction
    • PostFileSave hooks for TypeScript compilation and test running
    • PostToolUse hook for autonomous health evaluation
  4. Custom Agent: The wellness-coach.md agent definition provides the AI personality and behavior guidelines for autonomous health coaching.

  5. MCP Configuration: The .kiro/settings/mcp.json configures DevWell as a self-contained MCP server that the AI tool uses for health management.

  6. Iterative Development: Each system was built incrementally with Kiro - from types β†’ core β†’ modules β†’ autonomous engine β†’ adaptive learning β†’ MCP layer.

πŸ”’ Privacy

  • 100% local: All health data stored on your machine only
  • No telemetry: Zero data transmitted to any server
  • No cloud: Works completely offline after installation
  • Your data: Delete ~/.local/share/devwell/ to remove all data

πŸ“œ License

MIT License - see LICENSE file.

πŸ™ Attribution

  • Model Context Protocol SDK - MCP server framework
  • Health guidelines based on WHO, FDA, American Academy of Ophthalmology, and published research
  • Exercise and meditation techniques adapted from established wellness practices

🀝 Contributing

Contributions welcome! Please read the steering files in .kiro/steering/ for code conventions.


Built with 🌿 by a developer, for developers. Because great code starts with a healthy coder.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages