Back to corpus
architecturetechnical paper candidatescore 58

Milkmen Delivery - Shared Agent CRM Architecture Plan

-- Many-to-many: agents can share territories CREATE TABLE territory_agents ( territory_id uuid REFERENCES territories(id), agent_id uuid REFERENCES agents(id), role text NOT NULL CHECK (role IN ('seeder', 'closer', 'both')), visit_order integer NOT NULL, -- 1 = visits first, 2 = visits second active boolean DEFAULT true, PRIMARY KEY (territory_id, agent_id) ); ```

Full HTML reader

Read the full artifact

Open in new tab

Extracted abstract or opening context

**Version:** 1.0 **Date:** February 2025 **Scope:** Rebuild CRM for two-agent (Mohamed + Carson) shared territory system ### The New System A CRM where **two sales agents work the same territories sequentially**: 1. Carson (seeder) visits a location first 2. System auto-schedules Mohamed (closer) to visit N days later 3. Both agents see pre-planned calendars built ahead of time 4. One unified dashboard (not separate per-agent views) ### Core Principles - **Shared Territories** - Same locations, different visit sequences - **Sequential Workflows** - Agent 1 → wait → Agent 2, automatically - **Pre-Planned Schedules** - Know your week before it starts - **Unified View** - One dashboard, filter by agent #### Tasks: 1. Create new database tables - `territories`, `territory_agents` - `visit_sequences`, `visit_steps` - `agent_schedules`, `schedule_slots` 2. Build core hooks - `useTerritories()` - `useVisitSequence(locationId)` - `useAgentSchedule(agentId, dateRange)`

Promotion decision

What has to happen next

Promote into a technical note or architecture paper with implementation anchors.

Why this is not always a full paper yet

Corpus pages are public-safe readers for discovered workspace artifacts. They are not automatically final papers. A corpus item becomes a polished paper only after the editable source, evidence checkpoints, references, figures, render path, and release status are attached through the paper schema.