Skip to main content
This document is the single source of truth for the Hitler v2 pivot. It maps every PRD requirement to current codebase state, identifies gaps, and defines the implementation plan. Last updated: March 2026.

Executive Summary

Hitler is pivoting from a generic multi-tenant workplace intelligence platform to a strict, opinionated accountability bot purpose-built for Inagiffy’s 10-person content marketing agency. The bot will automate daily task tracking rituals in Slack, enforce accountability through a card system, generate layered reports (public + private), and add a journaling layer for early blocker/wellbeing detection.

What Changes

AspectCurrent (v1)Target (v2)
AudienceAny organizationInagiffy’s 10-person content team
Task flowUser tells bot, draft, confirmMorning thread, team posts tasks, bot tracks all day
Task modelGeneric title/priority/dueTyped + sized (S/M/L) + weighted + client-tagged
AccountabilityFlags (wellbeing-based)Card system (yellow/red) + carry-forward escalation
ReportsReal-time analytics dashboardScheduled daily/weekly/monthly reports (public + private)
ClientsNot trackedFirst-class entity with deploy schedules and health tracking
Bot roleConversational assistantStrict process enforcer + report generator

What Stays

  • Bot-first architecture (Slack as primary interface)
  • NestJS API as single source of truth
  • Drizzle ORM + PostgreSQL
  • BullMQ job system + Redis
  • LLM for natural language parsing (task classification, OOO parsing)
  • Human-in-the-loop confirmation for task creation
  • SDK for bot-to-API communication
  • Multi-tenant foundation (even if single-tenant now, keeps future optionality)

Gap Analysis: PRD vs Current Codebase

Legend

  • EXISTS = Feature is built and working
  • PARTIAL = Some foundation exists but needs significant changes
  • NEW = Needs to be built from scratch

Feature-by-Feature Breakdown

#PRD FeatureStatusCurrent StateWhat Needs to Change
1Morning Thread (9 AM)NEWNo thread management existsNew cron, Slack thread creation, reply tracking
2Task Submission Deadline (11 AM)NEWNo submission trackingCron to scan thread replies, cross-ref roster, issue cards
3Auto-Classification EnginePARTIALLLM parses tasks but no type/size/clientAdd task-type keyword map, size/weight system, client matching
4End-of-Day Collection (5-7 PM)NEWNo status collection from threadsThread scanning, emoji/status parsing, carry-forward logic
5Daily Reports (Public + Private)NEWOnly real-time analytics dashboardReport generation service, public/private channel posting
6Weekly ReportsNEWNo scheduled reportsKPI comparison engine, card tallies, client health
7Thursday Check-InPARTIALMood check-in exists but different purposeRepurpose to KPI-based underperformer detection + DM
8Monthly ReportNEWNo monthly reportingTrend analysis, scalability assessment, action items
9Card System (Yellow/Red)NEWFlags exist but different conceptNew DB tables, card logic, DM notifications, weekly reset
10Ops Bulk-TaggingNEWNo classification review UISlack interactive messages for ops review
11Invisible Labor LoggingNEWNo intervention tracking/log-intervention command, attribution, reporting
12Positive ReinforcementNEWNo shoutouts or rewardsDaily/weekly/monthly recognition system
13Client-Level GroupingNEWProjects exist but not clientsNew client entity, deploy schedules, health tracking
14Blocker EscalationNEWNo blocker tracking/blocked, /unblocked, escalation timeline
15Onboarding Ramp-UpNEWNo ramp-up periodsPer-user ramp config, adjusted benchmarks, advisory notices
16Retrospective & Action ItemsNEWNo action item trackingAction items from monthly reports, carry-forward
17OOO ParsingNEWNo OOO channel monitoringNLP parsing of #out-of-office, date extraction
18Task Sizing (S/M/L + weights)PARTIALTasks have priority (1-5) but no size/weightAdd size, weight, task-type columns
19KPIs by RoleNEWNo role-based benchmarksKPI targets per role, weekly comparison engine
20Slash CommandsPARTIAL/hitler existsAdd /blocked, /unblocked, /log-intervention, /red-card, /dismiss-card, /ooo
21Checklists/SOPs (Manager thoughts)NEWNo checklist systemPredefined checklists per role, completion tracking

Database Changes Required

New Tables

clients
  id, organizationId, name, deploySch (day of week)
  contentCadence (newsletters/week), status
  assignedWriters[], assignedDesigners[]
  createdAt, updatedAt

cards
  id, userId, organizationId, type (yellow/red)
  reason, triggeredBy (auto/manual), relatedTaskId
  issuedAt, weekNumber, yearNumber
  dismissed (boolean), dismissedBy, dismissReason
  autoGenerated (boolean)

interventions
  id, loggedBy, attributedTo, organizationId
  description, createdAt
  includedInReports[]

morning_threads
  id, organizationId, slackChannelId, slackThreadTs
  date, status (open/closed)
  createdAt

thread_submissions
  id, morningThreadId, userId
  slackMessageTs, rawText
  submittedAt, isLate (boolean)

task_statuses (end-of-day)
  id, taskId, userId, date
  status (done/carry_forward/dropped/no_update)
  carryForwardReason, carryForwardCount
  updatedAt

blockers
  id, taskId, userId, organizationId
  description, blockedBy (userId, nullable)
  reportedAt, resolvedAt, resolution
  escalatedToFounderAt

ooo_records
  id, userId, organizationId
  startDate, endDate, reason
  parsedFromMessage, slackMessageTs
  approved (boolean)

action_items
  id, organizationId, sourceReportId
  text, assignedTo, status (open/in_progress/done/deferred)
  carriedForwardCount, createdAt, updatedAt

reports
  id, organizationId
  type (daily_public/daily_private/weekly_public/weekly_private/monthly)
  generatedAt, postedToChannel, slackMessageTs
  content (JSON), actionItems[]

kpi_targets
  id, organizationId, role, kpiName
  target, unit, notes
  createdAt, updatedAt

task_type_map
  id, organizationId
  taskType, keywords[], size (S/M/L)
  weight, notes
  createdAt, updatedAt

checklists
  id, organizationId, name, role
  items (JSON array), isActive
  createdAt, updatedAt

checklist_completions
  id, checklistId, userId, date
  completedItems (JSON), completedAt

Modified Tables

tasks (add columns)
  + taskType (varchar) — "newsletter_draft", "social_post", etc.
  + size (enum: S/M/L)
  + weight (integer: 1/3/5)
  + clientId (FK to clients)
  + carryForwardCount (integer, default 0)
  + isAiAssisted (boolean)
  + opsOverrideType, opsOverrideSize, opsOverrideClient

task_drafts (add columns)
  + taskType, size, weight, clientId
  + isAiAssisted

users (add columns)
  + rampUpStartDate (date, nullable)
  + rampUpDurationWeeks (integer, default 4)
  + assignedClients[] (relation)

New API Modules Required

ModulePurposeKey Endpoints/Services
cardsYellow/red card managementIssue, dismiss, list, weekly reset, auto-convert (3 yellow to 1 red)
clientsClient CRUD + health trackingCreate, list, update, assign members, deploy schedules
morning-threadsThread lifecycle managementCreate thread, track submissions, scan replies
reportsScheduled report generationDaily/weekly/monthly, public/private, archive
kpiKPI engineRole targets, weekly comparison, underperformer detection
interventionsInvisible labor loggingLog, list, attribute, include in reports
blockersBlocker tracking + escalationReport, resolve, escalation timeline
oooOut-of-office managementParse messages, store records, exempt from cards
action-itemsRetrospective action trackingCreate from reports, carry forward, mark done
checklistsSOP/checklist managementDefine per role, track completion
classificationAuto-classification engineTask-type keyword map, auto-tag, ops review
reinforcementPositive reinforcementDaily shoutout, performer of week, employee of month

New Cron Jobs Required

TimeJobModule
9:00 AMPost morning thread in #today-in-progressmorning-threads
11:00 AMScan thread for missing submissions, issue yellow cardscards + morning-threads
11:30 AMSend auto-classification digest to opsclassification
5:00 PMPost status nudge in morning threadmorning-threads
7:00 PMCollect end-of-day statuses, process carry-forwardsmorning-threads + tasks
9:00 PMGenerate + post daily reports (public + private)reports
Thursday 6:00 PMSend Thursday check-in DMs to underperformerskpi
Friday 6:00 PMGenerate + post weekly reports (public + private)reports
Last working day, 6:00 PMGenerate + post monthly report (private)reports
Monday 12:00 AMReset weekly yellow card countscards
All crons must be timezone-aware and use the existing DynamicCronService pattern.

New Slash Commands

CommandHandlerPurpose
/blocked [task] [reason]blockers moduleReport a blocker, notify ops
/unblocked [task]blockers moduleMark blocker resolved
/log-intervention @person [description]interventions moduleLog invisible labor
/red-card @person [reason]cards moduleManually issue red card
/dismiss-card @person [card-id] [reason]cards moduleDismiss a card
/ooo [start] [end] [reason]ooo moduleStructured OOO (optional, bot also parses freeform)

Implementation Phases

Phase 1: Foundation (Data Model + Core Loop)

Goal: Morning thread to task submission to end-of-day collection to basic daily report. Workstreams (parallelizable via worktrees):
1

1A: Database Schema Changes ✅ COMPLETED

Branch: feat/v2-schemaMerged
  • ✅ Added new tables: clients, cards, morning_threads, thread_submissions, task_statuses, ooo_records, task_type_map
  • ✅ Modified tasks table: added taskType, size, weight, clientId, carryForwardCount
  • ✅ Modified task_drafts table: added same columns
  • ✅ Modified users table: added rampUpStartDate, rampUpDurationWeeks
  • ✅ Generated migration
  • ✅ Added enums: TaskSize, TaskType, CardType, CardTrigger, ReportType, TaskStatusType, OOOStatus
2

1B: Client Management Module ✅ COMPLETED

Branch: feat/v2-clientsMerged
  • ✅ New clients module in API (CRUD + assign members + deploy schedules)
  • ✅ Client-task relationship
  • ✅ Admin dashboard page for client config
  • ✅ SDK methods for client operations
  • apps/api/src/modules/clients/ — service, controller, module
  • apps/web/src/app/dashboard/clients/ — admin UI
3

1C: Morning Thread System ✅ COMPLETED

Branch: feat/v2-morning-threadsMerged
  • ✅ New morning-threads module with service, controller, and REST endpoints
  • ✅ Cron: {orgId}:morning-thread posts daily thread at configured time (default 9 AM)
  • ✅ Cron: {orgId}:submission-deadline checks missing submissions at configured time (default 11 AM), DMs users who haven’t replied
  • ✅ Track thread TS per day per org in morning_threads table
  • ✅ Slack bot detects replies to morning threads, records as thread_submissions
  • ✅ SDK methods: getTodayMorningThread, recordThreadSubmission, findMorningThreadByTs
  • ✅ Org preferences: enableMorningThread, morningThreadTime, submissionDeadlineTime
4

1D: End-of-Day Collection ✅ COMPLETED

Branch: feat/v2-eod-collectionMerged
  • ✅ 5 PM nudge posted as reply to morning thread
  • ✅ 7 PM scan: parse emoji statuses, detect done/carry-forward/dropped
  • ✅ Carry-forward counter incremented on tasks
  • ✅ No-update detection for users who don’t reply
  • ✅ Store in task_statuses table
  • ✅ Daily summary posted to progress channel
  • ✅ New org preferences: eodNudgeTime, eodCollectionTime

Phase 2: Accountability Layer

Goal: Card system + auto-classification + ops review + blocker tracking.
1

2A: Card System ✅

Branch: feat/v2-cardsCOMPLETED
  • New cards module (issue, dismiss, list, auto-convert)
  • Yellow card triggers: missing submission (11 AM), task overdue 2+ days, no EOD update
  • Red card: 3 yellows/week auto-converts, manual via /red-card
  • Weekly reset (ISO week tracking)
  • DM notification on card issuance
  • Card exemptions: OOO, ramp-up period (first 2 weeks grace)
Files created:
  • apps/api/src/modules/cards/ — service, controller, module
  • packages/rules/src/cards.ts — pure evaluation functions
  • tests/unit/card-rules.test.ts — 23 tests
2

2B: Auto-Classification Engine ✅

Branch: feat/v2-classificationCOMPLETED
  • Task-type-to-size keyword map (admin-configurable)
  • On task submission: match against keywords, auto-assign type/size/weight/client
  • Confidence scoring — if uncertain, default to “Ad-hoc / M”
  • 11:30 AM classification digest posted to ops channel
  • Admin UI for task-type map management
Files created:
  • apps/api/src/modules/classification/ — service, controller, module
  • apps/web/src/app/dashboard/settings/task-types/page.tsx — admin UI
  • tests/unit/classification.test.ts — unit tests
  • SDK methods: classifyTask, getTaskTypeMap, createTaskTypeMapEntry, etc.
3

2C: Blocker System ✅

Branch: feat/v2-blockersCOMPLETED
  • /blocked and /unblocked slash commands
  • ✅ Auto-detection from carry-forward reasons mentioning dependencies
  • ✅ Escalation: 0h ops notified, 8h founder DM, 24h critical in report
  • ✅ Resolution time tracking
Files created:
  • apps/api/src/modules/blockers/ — service, controller, module
  • packages/db/src/schema/blockers.ts — blocker table
  • Slash command handlers in adapters (parser + conversation)
4

2D: OOO Parsing ✅

Branch: feat/v2-oooCOMPLETED
  • ✅ Monitor #out-of-office channel in real-time
  • ✅ NLP extraction: person, date range, reason
  • ✅ Store in ooo_records
  • ✅ Used by card system for exemptions
  • ✅ Used by KPI engine for prorated targets
  • ✅ Fallback: /ooo structured command
Files created:
  • apps/api/src/modules/ooo/ — service, controller, module
  • LLM-based date/person extraction
  • SDK methods for OOO operations
  • Daily status transition cron

Phase 3: Intelligence Layer

Goal: KPI engine + Thursday check-ins + weekly reports + client health.
1

3A: KPI Engine ✅ COMPLETED

Branch: feat/v2-kpiMerged
  • ✅ Per-role KPI targets (full CRUD API + seed defaults)
  • ✅ Weekly comparison: actual output vs target with composite scoring
  • ✅ Onboarding ramp-up prorating (configurable duration, graduated multiplier)
  • ✅ OOO prorating (targets reduced proportionally to days absent)
  • ✅ Workload distribution calculation (weighted task points)
  • ✅ KPI trends (4-week history per user)
  • ✅ Weekly snapshot cron: {orgId}:weekly-kpi-snapshot (Friday 11 PM)
  • ✅ Performance levels: exceptional / strong / on_track / below / critical
  • ✅ Admin UI for KPI target management (settings page)
Implemented:
  • apps/api/src/modules/kpi/ — service, controller, module
  • DB tables: kpi_targets, kpi_snapshots
  • SDK methods: getKpiTargets(), setKpiTarget(), getWeeklyKpi(), getTeamKpi(), etc.
  • Web admin UI: apps/web/src/app/dashboard/settings/kpi-targets/page.tsx — full CRUD, seed defaults, team KPI summary, grouped by role
2

3B: Report Generation ✅

Branch: feat/v2-reportsCOMPLETED
  • Daily Public (9 PM): Per-person task list + completion % (weighted), team total
  • Daily Private (9 PM): Public + cards issued, stale tasks, OOO context, intervention logs, client summary
  • Weekly Public (Fri 6 PM): Team stats, target day compliance, performer of week
  • Weekly Private (Fri 6 PM): Individual KPI comparison, card tally, carry-forward patterns, client health, workload distribution, recommended actions
  • Monthly (Last working day): Trend lines, card history, recurring blockers, scalability assessment, employee of month, recommended 1:1s, action items
Implemented:
  • apps/api/src/modules/reports/ — service, controller, report templates
  • Intervention logging (/log-intervention command)
  • Action items with carry-forward tracking
  • Auto-generated recommended actions based on team data
  • New DB tables: reports, interventions, action_items
  • SDK methods: getReports(), logIntervention(), getActionItems(), etc.
  • Dynamic crons: daily-report (9 PM), weekly-report (Fri 6 PM), monthly-report (last working day 6 PM)
3

3C: Thursday Check-In ✅ COMPLETED

Branch: Built into feat/v2-kpiMerged
  • ✅ Calculate week-to-date performance per person vs KPI targets
  • ✅ Check OOO records for absences (skip OOO users)
  • ✅ If below critical threshold AND not OOO, send empathetic DM
  • ✅ Red card context: different message if red card issued this week
  • ✅ Dynamic cron: {orgId}:thursday-checkin (Thursday 6 PM)
  • ✅ Manual trigger endpoint: POST /kpi/thursday-checkin
Implemented in: apps/api/src/modules/kpi/kpi.service.tsrunThursdayCheckIn()
4

3D: Client Health Tracking ✅ COMPLETED

Branch: feat/v2-client-health
  • ClientHealthService with per-client task rollup, deploy compliance, health score (0-100)
  • ✅ Health levels: healthy (≥75), at_risk (≥50), critical (<50)
  • ✅ Deploy streak counting and week-over-week completion trend
  • ✅ Per-member breakdown (writers/designers) and 4-week weekly trend
  • ✅ API endpoints: GET /clients/health, GET /clients/:id/health
  • ✅ SDK methods: getClientHealth(), getClientHealthDetail()
  • ✅ Dashboard rewritten with real health data (score, completion, streaks, member breakdown)
  • ✅ Client health section wired into weekly private and monthly reports
  • ✅ Unit tests for health score calculation, thresholds, deploy streaks
Depends on: 1B (client management), 3B (reports)

Phase 4: Reporting Dashboard + Polish

Goal: Admin dashboard, positive reinforcement, retrospectives.
1

4A: Invisible Labor Logging ✅

Branch: feat/v2-remaining-gapsCOMPLETED
  • log_intervention LLM tool in ChatService — resolves user by name, logs via InterventionsService
  • ✅ Posts to progress channel automatically
  • ✅ Already surfaced in private daily/weekly/monthly reports (existing ReportsService integration)
2

4B: Positive Reinforcement ✅

Branch: feat/v2-reinforcementCOMPLETED
  • Daily: 100% completion triggers public shoutout in #wins channel
  • Weekly: Performer of the Week (highest weighted completion)
  • Monthly: Employee of the Month auto-nomination
  • ✅ Post in configurable #wins channel (falls back to progress channel)
  • ✅ DM recognized users
  • ✅ Reinforcement history tracking with REST API
  • ✅ Admin settings UI (toggle + channel picker)
  • ✅ SDK methods: getReinforcementHistory(), triggerDailyShoutout(), triggerWeeklyPerformer()
  • ✅ Unit tests for selection logic
Files created:
  • apps/api/src/modules/reinforcement/ — service, controller, module
  • packages/db/src/schema/reinforcements.ts — DB schema
  • tests/unit/reinforcement.test.ts — unit tests
3

4C: Action Item Tracking

COMPLETED — Action Items admin UI with auto-creation from reports
  • ✅ Action items admin dashboard page with filters (status, priority, assignee)
  • ✅ Inline status updates (mark done, cancel)
  • ✅ Create new action items manually
  • ✅ Auto-creation of action items from weekly report recommendations
  • ✅ Duplicate detection prevents re-creating existing open items
  • ✅ Carry-forward badge display
  • ✅ “View all” link from Reports page to Action Items
  • ✅ Count endpoint for nav badge
4

4D: Admin Dashboard Updates

Branch: feat/dashboard-overhaulCOMPLETED — Ops-brain command center dashboard
  • Today view: Live task feed grouped by person, completion %, card pills, cron status, alerts
  • Clients view: Health dashboard with metrics, deploy streaks, sparklines
  • Team view: Per-person KPI, card history, task list with advisory notes
  • Reports view: Weekly Private/Public, Daily Digest tabs
  • Cards view: Card log, dismiss, manual red card issuance, rules reference
  • Dark theme: IBM Plex Mono + Instrument Serif, custom ops-brain color palette
  • Employee view: Simplified dashboard retained for non-manager roles

Phase 5: Checklists & SOPs (from Manager Thoughts)

Goal: Pre-defined checklists and SOPs for process enforcement.
This phase addresses the manager’s additional requirements that are NOT in the PRD but were provided as supplementary input. These should be validated with the manager before implementation.
1

5A: Checklist System ✅ COMPLETED

Branch: feat/v2-checklistsNew module for pre-defined checklists that team members complete:Content Writing Checklist:
  • Correct hyperlinks
  • AI-slop edited out
  • Appropriate writing style
  • Poll/news/tools/NL outline correctly followed
Content QC Checklist (before design handoff):
  • No AI-slop present
  • Topic makes sense
  • Writing style appropriate
Design QC Checklist:
  • Redirect URL added to polls
  • Hyperlinks correct
  • Images/media clickable
Client QC Checklist:
  • Subject line options shared
  • Scheduled/followed up on time
Designer Checklist:
  • All thumbnails updated twice a week
  • New briefs delivered on time
  • Turnaround time for all clients under 24 hrs
  • 1 new design task independently picked and executed every week
Files to create:
  • apps/api/src/modules/checklists/ — service, controller
  • DB tables: checklists, checklist_completions
  • Admin UI for checklist management
  • Bot integration: checklist completion via Slack
2

5B: SOP Tracking ✅

Branch: feat/v2-sopsCOMPLETEDAutomated tracking of recurring SOPs:Client SOP:
  • Weekly report on Monday
  • Monthly report on last day of month
  • Monthly call scheduled with each client
Internal Ops:
  • Deadlines adhered
  • #ooo process followed
  • Discussions in public channels
  • Monthly 1:1 with ops/manager
Analytics SOP:
  • Reports updated every Monday
  • Shared with respective clients after internal QC
  • Internal sync (analytics call) for data-driven decisions
Client Onboarding:
  • Onboarding form filed
  • Added to Slack (primary) / WhatsApp (secondary)
  • Weekly reports on experiments during month 1
  • Month 1 performance report
  • Swift onboarding to remaining SOPs
Employee Onboarding:
  • Go through master client database
  • Read checklist of processes (internal ops checklist)
  • Read 5+ newsletter editions (or 10 social posts) of assigned clients
  • Create 1-pager on client understanding
  • Daily 1:1 with ops during week 1
  • Weekly 1:1 during month 1
  • Then regular monthly cadence

PRD Open Questions (Need Answers Before Implementation)

These are flagged in the PRD as unresolved. Must be answered before starting Phase 3:
#QuestionImpactSuggested Default
1Newsletter quality metrics (open rate, CTR) — data source?KPI engine needs this for writer evaluationStart without it; add Beehiiv API integration later
2Designer dependency tracking — how to detect content handoff?Affects designer KPI calculation and blocker detection✅ Resolved: auto-notifies designers when content tasks complete
3AI-assisted vs manual drafts — how does bot know?Changes task weight (M vs L for newsletter drafts)Default to AI-assisted (M); writer or ops can override to manual (L)
4Multiple tasks in one message — one per line or list?Parser needs to handle both formatsSupport both: numbered list and one-per-line
5Weekend work — does bot run Saturday/Sunday?Cron schedule, card exemptions✅ Resolved: Mon-Fri only via isWorkingDay() + holiday config
6Engagement metrics for socials/community — definition?Social writer KPIDefer until baseline established; track volume only initially

Items Missing from PRD (Identified During Analysis)

Things the current codebase has that the PRD doesn’t address, or gaps in the PRD itself:
#GapRecommendation
1Multi-tenancy — PRD is single-org focused but codebase is multi-tenantKeep multi-tenant architecture; configure Inagiffy as the primary org
2Existing mood system — PRD replaces daily mood with Thursday check-in onlyKeep daily mood as optional; Thursday check-in is the mandated one
3Existing flags system — PRD introduces cards which are different from flagsRun both: flags for wellbeing patterns, cards for accountability
4Existing reminders — PRD doesn’t mention personal remindersKeep reminders; they complement the accountability system
5Web dashboard chat — PRD is entirely Slack-focusedKeep web chat for admin convenience
6Journal feature — PRD’s Thursday check-in is similar but differentKeep journals as private; Thursday check-in is separate (shared with leadership)
7Inquiry system — PRD has no equivalentKeep for HR/support threads
8Checklist system — Manager wants it but PRD doesn’t include itAdd as Phase 5 (separate from PRD scope)
9Analytics SOP automation — Manager wants automated Monday reports to clientsNeeds external integration (Beehiiv, social analytics APIs) — defer
10Public holiday config — PRD mentions it but no detail✅ Done: holidays array in org preferences + isWorkingDay() utility
11”Same as yesterday” detection — PRD mentions flagging low-effort submissions✅ Done: Jaccard similarity >85% flags to ops channel
12Task reassignment — PRD mentions “consider reassigning” for stale tasks but no mechanism✅ Done: reassign_task LLM tool + TasksService.reassignTask()

Effort Estimates by Phase

PhaseScopeParallel WorktreesKey Risk
Phase 1Foundation4 worktrees (1A-1D)Schema migration on production DB
Phase 2Accountability4 worktrees (2A-2D)Card system edge cases (OOO, ramp-up exemptions)
Phase 3Intelligence4 worktrees (3A-3D)KPI calibration, report template design
Phase 4Dashboard + Polish4 worktrees (4A-4D)Admin UI scope creep
Phase 5Checklists/SOPs2 worktrees (5A-5B)Needs manager validation before starting

Worktree Strategy for Parallel Development

Each phase has independent workstreams that can be developed in parallel using wt create:
# Phase 1 — all can run in parallel
wt create feat/v2-schema          # Agent 1: Database changes
wt create feat/v2-clients         # Agent 2: Client management
wt create feat/v2-morning-threads # Agent 3: Thread system
wt create feat/v2-eod-collection  # Agent 4: EOD collection (starts after schema merges)
Merge order: Schema first, then clients + morning-threads (parallel), then EOD collection last (depends on both).

Files That Will Be Modified (Existing)

These existing files will need changes (not just new files):
FileChange
packages/db/src/schema/tasks.tsAdd taskType, size, weight, clientId columns
packages/db/src/schema/users.tsAdd rampUp fields
packages/db/src/schema/index.tsExport new schemas
packages/shared/src/enums.tsNew enums: TaskSize, CardType, TaskType, ReportType
apps/api/src/modules/chat/chat.service.tsNew LLM tools for classification, clients
apps/api/src/modules/jobs/dynamic-cron.service.tsRegister new per-org crons (morning thread, EOD, reports)
apps/api/src/modules/jobs/scheduler.service.tsNew static crons (card reset, monthly report)
apps/bot-slack/New slash command handlers, interactive message handlers, thread management
packages/sdk/New client methods for all new modules
packages/adapters/src/parser.tsHandle new slash commands
packages/rules/src/Card evaluation rules, KPI rules
apps/web/src/app/dashboard/New admin pages (clients, cards, reports, KPIs, checklists)
docs/mint.jsonAdd new doc pages to navigation

Migration Strategy

The database schema changes are significant. Plan a migration window.
  1. All new tables are additive — no existing tables are dropped
  2. Existing column additions are nullable or have defaults — no data loss
  3. Run migrations on staging first, verify with seed data
  4. Backfill strategy: Existing tasks won’t have type/size/client — mark as “unclassified” and let ops tag retroactively (or ignore historical data)
  5. Feature flags: New crons should be gated behind org preferences (e.g., enableMorningThread, enableCardSystem) so they can be turned on gradually

Cross-Cutting: Multi-Agent Bot Architecture

This section addresses the multi-agent bot architecture discussed in the ops meeting. The manager wants multiple specialized bots to automate ops enforcement — removing manual follow-ups and reducing personality conflicts in accountability. Status: Proposal — pending manager approval.

Problem

Today, ops manually does all follow-ups: chasing late submissions, reminding about deadlines, escalating unresolved blockers, and checking on client health. This is tedious and creates personality conflicts (“the Hitler aspect of ops work”). A single general-purpose bot cannot handle all of these proactively — it only responds when spoken to.

Proposed Architecture: 3 Specialized Agents

Instead of one bot that does everything, we split Hitler into 3 autonomous agents that each own a specific domain and act proactively on schedules and triggers. They share the same Slack workspace, database, and API — but each has its own personality, schedule, and escalation rules.
┌──────────────────────────────────────────────────────────┐
│                    Hitler (Slack Bot)                       │
│                                                          │
│  ┌────────────────┐  ┌──────────────┐  ┌──────────────┐  │
│  │ Follow-Up Agent│  │ Task Agent   │  │ Escalation   │  │
│  │                │  │              │  │ Agent        │  │
│  │ Deadlines,     │  │ Morning      │  │ Blockers,    │  │
│  │ reminders,     │  │ threads,     │  │ stale tasks, │  │
│  │ nudges,        │  │ classification│  │ client health│  │
│  │ check-ins      │  │ EOD status   │  │ red flags    │  │
│  └───────┬────────┘  └──────┬───────┘  └──────┬───────┘  │
│          │                  │                  │          │
│          └──────────────────┼──────────────────┘          │
│                             ▼                             │
│                    Shared Services                        │
│              (DB, Redis, BullMQ, Slack API)               │
└──────────────────────────────────────────────────────────┘

Agent Breakdown

1. Follow-Up Agent (Automates manual chasing)

The biggest ops time sink. This agent proactively DMs people and posts reminders so ops never has to manually follow up.
TriggerAction
11 AM, no morning submissionDM: “Hey, you haven’t posted in today’s thread yet. Need help?”
Task approaching deadline (same day)DM: “Heads up — [task] for [client] is due today.”
Carry-forward day 2DM: “This task has been carried forward 2 days. What’s the blocker?”
Thursday, below 60% weekly KPIEmpathetic check-in DM (existing Thursday check-in logic)
Post-deadline, no status update by 6 PMDM: “How did [task] go today? Done / carrying forward / blocked?”
Best practice violation detectedDM: “Reminder: [client] posts need redirect URLs. Missing on today’s.”
Key design: Messages come from the bot, not from ops. This removes the personality conflict — the bot is enforcing process, not a person.

2. Task Agent (Manages the daily task lifecycle)

Owns the morning-to-evening task flow. This is the “living functional agentic brain” for daily operations.
TriggerAction
9 AM dailyPost morning thread in channel
Team member replies in threadParse tasks, auto-classify type/size/client, create task drafts
11:30 AMSend classification digest to ops (confirm/override via Slack buttons)
“Same as yesterday” detectedFlag to ops: “Lazy update from [Name] — identical to yesterday’s tasks”
7 PM dailyCollect EOD statuses, process carry-forwards, update task records
9 PM dailyGenerate and post daily reports (public + private)
Context-aware prioritizationTag tasks by client urgency based on deploy schedules
“Same as yesterday” detection: The classification engine compares today’s submission against the previous day’s. If similarity is above 85%, it flags to ops rather than auto-accepting.

3. Escalation Agent (Catches things falling through cracks)

Monitors for problems that need attention and escalates with increasing urgency. Replaces the manual “checking in on everything” that ops does.
TriggerAction
Blocker unresolved for 8 hoursDM to founder/manager with context
Blocker unresolved for 24 hoursFlag as critical in daily report, suggest reassignment
Client deploy day approaching, tasks incompleteAlert ops: “[Client] deploys Thursday, 3 tasks still open”
3 yellow flags in a weekAuto-escalate to red flag, notify ops
Task stale for 5+ daysFlag as “dead task” in report, suggest drop or reassign
New client in first month, KPIs laggingAdvisory notice (not penalty) — onboarding ramp-up

How It Maps to Our Existing Architecture

The multi-agent system does not require a rewrite. It builds on what we already have:
What We HaveWhat It Becomes
Single ChatServiceSplit into 3 agent services, each with focused LLM system prompt
DynamicCronServiceRegisters crons for all 3 agents (already supports per-org crons)
BullMQ job queuesEach agent gets its own queue + a shared agent-events queue
Slack bot (single responder)Still one Slack app — agents share it, post under the same bot name
packages/rules/Escalation rules, flag evaluation, “same as yesterday” detection
packages/adapters/parser.tsRoutes user messages to the correct agent based on intent
Single Slack app, multiple brains. The team sees one bot (“Hitler”) but behind the scenes, different agents handle different message types. No need for multiple Slack app installs.

Inter-Agent Communication

Agents don’t call each other directly. They communicate through events on BullMQ:
EventFromToExample
task.carry_forwardTask AgentFollow-Up AgentTrigger day-2 carry-forward DM
task.carry_forwardTask AgentEscalation AgentDay 3+ triggers flag evaluation
task.completedTask AgentEscalation AgentClear any pending escalation for that task
flag.issuedEscalation AgentTask AgentAnnotate task with flag reference
submission.missingTask AgentFollow-Up Agent11 AM missing submission triggers DM
blocker.reportedTask AgentEscalation AgentStart escalation timer (8h, 24h)
deadline.approachingTask AgentFollow-Up AgentSend deadline reminder DM
client.deploy_at_riskEscalation AgentFollow-Up AgentNudge assigned team members about at-risk deploy

Implementation Plan

This is not a separate phase — the agent split happens incrementally alongside the existing phases: During Phase 1-2 (now): Build all features in the single ChatService as planned. But design services with clean interfaces so they can be extracted later. Specifically:
  • Keep follow-up logic in its own service class (not mixed into cron handlers)
  • Keep escalation rules in packages/rules/ (already planned)
  • Use BullMQ events between modules (not direct service calls)
During Phase 3 (KPI + reports): Extract the 3 agents as separate NestJS service classes within the API app. Each gets:
  • Its own system prompt (focused, under 2K tokens each instead of one 6K+ prompt)
  • Its own tool set (8-10 tools each instead of 25+ in one service)
  • Its own BullMQ worker for processing events
What this looks like in code:
apps/api/src/modules/agents/
  follow-up.agent.ts      # Follow-Up Agent service
  task.agent.ts            # Task Agent service
  escalation.agent.ts      # Escalation Agent service
  agent-router.service.ts  # Routes user messages to correct agent
  agent-events.processor.ts # Processes inter-agent BullMQ events
Key constraint: All 3 agents live in the same NestJS app, same deployment, same database. No microservices complexity. Just clean separation of concerns with focused LLM prompts.

Cost and Model Considerations

Splitting into agents also enables cost optimization:
  • Follow-Up Agent: Can use a cheaper, faster model (e.g., Haiku) — it sends templated messages with light personalization
  • Task Agent: Needs the strongest model (Sonnet/Opus) for accurate classification and natural language parsing
  • Escalation Agent: Medium model (Sonnet) — rule-based triggers with LLM for writing escalation summaries
At Inagiffy’s scale (10 users, ~50-100 messages/day), the total LLM cost stays low regardless. But the split means each agent’s context window is smaller and more focused, which improves accuracy.

Definition of Done (per Phase)

  • All new API endpoints have Zod validation
  • All new crons are timezone-aware and respect org preferences
  • All Slack messages use proper Block Kit formatting
  • All new features have unit tests (Vitest)
  • SDK is updated with typed methods for all new endpoints
  • Docs are updated for new features
  • No existing tests are broken
  • No existing features are degraded