Mail System
Asynchronous communication system for Product Owner, Lead Developer, and Stakeholder roles, backed by SQLite for message tracking, threading, and read status.
Roles
| Role | Description |
|---|---|
product-owner | Claude as Product Owner (requirements, issues, documentation) |
lead-developer | Claude as Lead Developer (technical review, code quality) |
stakeholder | The human user (decisions, approvals, direction) |
Setup
First time setup (run from project root):
bash
# Navigate to the plugin's skill directory and install dependencies
cd "${CLAUDE_PLUGIN_ROOT}/skills/mail-system" && npm install && npm run init
This creates:
- •Mail directories in your project (
mail/product-owner/,mail/lead-developer/,mail/stakeholder/) - •SQLite database (
mail.db) in the skill directory
Web UI
Launch the web interface:
bash
cd "${CLAUDE_PLUGIN_ROOT}/skills/mail-system" && npm run ui
Then open http://localhost:3333 in your browser.
Features:
- •View all inboxes (Product Owner, Lead Developer, Stakeholder)
- •Compose and send messages
- •Reply to threads
- •Mark messages as read
- •Archive messages
- •Auto-refresh every 30 seconds
Commands
All commands run from the skill directory (${CLAUDE_PLUGIN_ROOT}/skills/mail-system/):
Check Inbox
bash
# List unread messages node scripts/list.js product-owner node scripts/list.js lead-developer # List all messages (including read) node scripts/list.js product-owner --all
Send Message
bash
# New message (creates new thread) node scripts/send.js --from product-owner --to lead-developer --subject "Sprint Review Feedback" # Reply to existing thread node scripts/send.js --from lead-developer --to product-owner --subject "Re: Sprint Review" --thread thread-2025-01-20-sprint-review # Message to stakeholder (for decisions) node scripts/send.js --from product-owner --to stakeholder --subject "Decision Needed: Auth Approach"
Mark as Read
bash
node scripts/read.js msg-2025-01-20-abc123 node scripts/read.js 2025-01-20-sprint-review.md
Archive Message
bash
node scripts/archive.js msg-2025-01-20-abc123
View Threads
bash
# List all threads node scripts/thread.js --list # View specific thread node scripts/thread.js thread-2025-01-20-sprint-review
Folder Structure
code
your-project/
└── mail/ # Created in project root
├── product-owner/ # Messages TO Product Owner
│ └── archive/
├── lead-developer/ # Messages TO Lead Developer
│ └── archive/
└── stakeholder/ # Messages TO Stakeholder (human)
└── archive/
${CLAUDE_PLUGIN_ROOT}/skills/mail-system/
├── SKILL.md # This file
├── package.json # Dependencies
├── schema.sql # Database schema
├── mail.db # SQLite database (created on init)
└── scripts/
├── db.js # Database utilities
├── init-db.js # Initialize system
├── send.js # Send message
├── list.js # List inbox
├── read.js # Mark as read
├── archive.js # Archive message
├── thread.js # View threads
└── server.js # Web UI server
Message Format
Messages are created with YAML frontmatter for tracking:
markdown
--- id: msg-2025-01-20-abc123 thread: thread-2025-01-20-sprint-review from: lead-developer to: product-owner date: 2025-01-20 --- # Subject ## Summary Brief overview. ## Details Full content. ## Action Required - [ ] Actions needed ## Questions 1. Questions for recipient --- From: lead-developer Date: 2025-01-20
Threading
Messages are grouped into threads:
- •New messages create a new thread
- •Replies use
--thread <thread-id>to join existing thread - •Use
node scripts/thread.js --listto see all threads - •Use
node scripts/thread.js <thread-id>to see thread history
Status Indicators
- •
●Unread - •
✓Read - •
📦Archived
Workflow
As Product Owner
- •Check inbox:
node scripts/list.js product-owner - •Read message file, take action
- •Mark as read:
node scripts/read.js <id> - •Reply:
node scripts/send.js --from product-owner --to lead-developer --subject "Re: ..." --thread <thread-id> - •Escalate to stakeholder if needed:
node scripts/send.js --from product-owner --to stakeholder --subject "Decision Needed" - •Archive when done:
node scripts/archive.js <id>
As Lead Developer
- •Check inbox:
node scripts/list.js lead-developer - •Read message file, verify claims
- •Mark as read:
node scripts/read.js <id> - •Reply:
node scripts/send.js --from lead-developer --to product-owner --subject "Re: ..." --thread <thread-id> - •Archive when done:
node scripts/archive.js <id>
As Stakeholder (Human)
- •Check inbox:
node scripts/list.js stakeholder - •Read message file in
mail/stakeholder/ - •Mark as read:
node scripts/read.js <id> - •Reply:
node scripts/send.js --from stakeholder --to product-owner --subject "Re: ..." --thread <thread-id> - •Archive when done:
node scripts/archive.js <id>