Files
stack/docs/3-architecture
Jason Woltje 3be60ccd18 docs: Add assignment-based trigger architecture
Implements Phase 0 foundation for non-AI coordinator.

Key features:
- User assigns issue to @mosaic bot user → triggers webhook
- Webhook receiver processes assignment events
- AI agent parses issue metadata (context, difficulty, agent)
- Queue manager tracks dependencies and status
- Orchestration loop spawns agents and monitors progress

Benefits:
- Natural Gitea workflow (just assign issues)
- Visual feedback in Gitea UI
- Granular control (assign what you want)
- Event-driven (webhooks, not polling)
- No CLI needed

Phase 0 issues: #156-161 (6 issues, 290.6K tokens)

Refs #142

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 15:30:21 -06:00
..

Architecture

Technical architecture and design principles for Mosaic Stack.

Chapters

  1. Overview — System design and component architecture
  2. Authentication — BetterAuth integration and OIDC flow
  3. Design Principles — PDA-friendly patterns and UX guidelines

Architecture Principles

  • Type Safety First: Shared types prevent frontend/backend drift
  • Multi-Tenant Ready: Row-level security with workspace isolation
  • PDA-Friendly: Calm, stress-free language and visual design
  • Modular: Plugin architecture for extensibility

Technology Decisions

Key architectural choices and their rationale:

  • BetterAuth over Passport.js for modern authentication
  • Prisma ORM for type-safe database access
  • Monorepo with pnpm workspaces for code sharing
  • PostgreSQL + pgvector for AI-ready data storage

Next Steps

  • Review API for implementation details
  • Check Development for workflow standards