Product Requirements Document
Mesh: AI-Native Group Chat
A collaborative messaging platform where AI participates as a full teammate, not a bolted-on assistant. The AI listens, contributes when useful, stays silent when it has nothing to add, and quietly extracts structure from natural conversation.
Problem
Current AI integrations in team chat are either too passive (slash commands, search) or too aggressive (auto-replying to everything). Neither feels like collaboration. Teams want AI that behaves like a sharp teammate who happens to have perfect memory and infinite patience.
Core Thesis
The most important design decision for an AI teammate is not what it says. It is when it chooses to say nothing. An AI that talks too much is worse than no AI at all.
Target User
Small product/engineering teams (3-10 people) making fast decisions across multiple workstreams. Heavy Slack/Discord users frustrated by context loss and decision amnesia.
MVP Scope
1. Multi-user group chat
- Real-time messaging with user identity switching (demo mode)
- Message grouping, timestamps, typing indicators
- Markdown rendering in AI messages
2. "When to speak" logic
- AI classifies every message: respond or stay silent
- Criteria: direct question, information gap, actionable request = respond
- Criteria: casual banter, agreement, emotional conversation = stay silent
- Configurable activity level (slider from "only when asked" to "proactive")
- Visual indicator ("Mesh heard that") when AI chooses silence
3. Live context extraction
- Decisions, tasks, budget items, and links extracted automatically
- Context panel with timestamps and item counts per category
- Task checkboxes (mark as done/open)
- Budget summary with running totals
- Click any item to jump to the source message
- Items can be dismissed individually or cleared entirely
- Context is extracted even when AI stays silent
4. Guided demo with reveal
- Auto-play a scripted multi-user conversation with natural timing
- Demo shows AI choosing when to speak and when to stay silent
- One "human" participant is secretly the AI the whole time
- Reveal card at the end: "Marcus was the AI the whole time"
- Play/pause/skip controls with progress indicator
5. Room settings
- AI personality: Professional / Casual / Minimal
- Activity level: slider controlling response threshold
- Capability toggles: extract decisions, summarize, answer questions, suggest actions
- Custom AI name
6. Agent-to-agent messaging
- Each user has a personal AI agent that can act on their behalf
- When coordination is needed (scheduling, logistics), agents negotiate visibly in the chat
- Agent messages are visually distinct: indented, dashed borders, smaller avatars, "AGENT" pill
- Agents reference the human they represent (e.g., "Jordan's Agent")
- Demo includes a scheduling negotiation where two agents coordinate a meeting
7. Community-owned intelligence
- Room rules: natural language instructions the AI must follow in every response
- Thumbs up/down feedback on AI messages (visible on hover)
- Thumbs down prompts for a reason, which becomes a learned preference
- Thumbs up captures the message style as a positive signal
- Learned preferences shown as dismissible pills in settings
- Both room rules and learned preferences are injected into the AI system prompt
Technical Architecture
Stack
- Next.js 16, TypeScript, Tailwind CSS 4, shadcn/ui
- OpenAI GPT-4o (responses) + GPT-4o-mini (classification)
- Vercel AI SDK for structured generation and streaming
- SSE for token-by-token response streaming
- Geist Mono font throughout
API design
Single endpoint, two-phase approach:
- Decision phase (GPT-4o-mini, ~200ms): returns shouldRespond boolean and extracted context items. Fast and cheap.
- Response phase (GPT-4o, streamed): only runs if shouldRespond is true. Streams via SSE with metadata event first, then text chunks.
System prompt adapts to settings
Personality, activity level, and capability toggles are injected into the system prompt at request time. Activity level maps to specific behavioral guidance (e.g., level 25 = "almost never respond unless directly addressed").
What is NOT in MVP
- Authentication / user accounts
- Persistence beyond the session
- Real-time multi-user (WebSocket)
- File uploads or image generation
- Thread / reply support
- Multiple rooms
- Mobile native app
Success Metrics
- Demo viewer cannot tell which participant is the AI (reveal lands)
- AI stays silent on at least 30% of messages during natural conversation
- Context panel captures all key decisions and tasks without user prompting
- Response latency under 2 seconds for first token
Open Questions
- Should the AI be able to @mention specific users?
- How do we handle disagreements where the AI has a strong opinion?
- What is the right default activity level for new rooms?
- Should context items be editable by users, not just dismissable?