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
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
Database Changes Required
New Tables
Modified Tables
New API Modules Required
New Cron Jobs Required
DynamicCronService pattern.
New Slash Commands
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):1A: Database Schema Changes ✅ COMPLETED
feat/v2-schema — Merged- ✅ Added new tables:
clients,cards,morning_threads,thread_submissions,task_statuses,ooo_records,task_type_map - ✅ Modified
taskstable: addedtaskType,size,weight,clientId,carryForwardCount - ✅ Modified
task_draftstable: added same columns - ✅ Modified
userstable: addedrampUpStartDate,rampUpDurationWeeks - ✅ Generated migration
- ✅ Added enums: TaskSize, TaskType, CardType, CardTrigger, ReportType, TaskStatusType, OOOStatus
1B: Client Management Module ✅ COMPLETED
feat/v2-clients — Merged- ✅ New
clientsmodule 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
1C: Morning Thread System ✅ COMPLETED
feat/v2-morning-threads — Merged- ✅ New
morning-threadsmodule with service, controller, and REST endpoints - ✅ Cron:
{orgId}:morning-threadposts daily thread at configured time (default 9 AM) - ✅ Cron:
{orgId}:submission-deadlinechecks missing submissions at configured time (default 11 AM), DMs users who haven’t replied - ✅ Track thread TS per day per org in
morning_threadstable - ✅ Slack bot detects replies to morning threads, records as
thread_submissions - ✅ SDK methods:
getTodayMorningThread,recordThreadSubmission,findMorningThreadByTs - ✅ Org preferences:
enableMorningThread,morningThreadTime,submissionDeadlineTime
1D: End-of-Day Collection ✅ COMPLETED
feat/v2-eod-collection — Merged- ✅ 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_statusestable - ✅ Daily summary posted to progress channel
- ✅ New org preferences:
eodNudgeTime,eodCollectionTime
Phase 2: Accountability Layer
Goal: Card system + auto-classification + ops review + blocker tracking.2A: Card System ✅
feat/v2-cards — COMPLETED- New
cardsmodule (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)
apps/api/src/modules/cards/— service, controller, modulepackages/rules/src/cards.ts— pure evaluation functionstests/unit/card-rules.test.ts— 23 tests
2B: Auto-Classification Engine ✅
feat/v2-classification — COMPLETED- 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
apps/api/src/modules/classification/— service, controller, moduleapps/web/src/app/dashboard/settings/task-types/page.tsx— admin UItests/unit/classification.test.ts— unit tests- SDK methods:
classifyTask,getTaskTypeMap,createTaskTypeMapEntry, etc.
2C: Blocker System ✅
feat/v2-blockers — COMPLETED- ✅
/blockedand/unblockedslash commands - ✅ Auto-detection from carry-forward reasons mentioning dependencies
- ✅ Escalation: 0h ops notified, 8h founder DM, 24h critical in report
- ✅ Resolution time tracking
apps/api/src/modules/blockers/— service, controller, modulepackages/db/src/schema/blockers.ts— blocker table- Slash command handlers in adapters (parser + conversation)
2D: OOO Parsing ✅
feat/v2-ooo — COMPLETED- ✅ Monitor
#out-of-officechannel 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:
/ooostructured command
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.3A: KPI Engine ✅ COMPLETED
feat/v2-kpi — Merged- ✅ 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)
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
3B: Report Generation ✅
feat/v2-reports — COMPLETED- 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
apps/api/src/modules/reports/— service, controller, report templates- Intervention logging (
/log-interventioncommand) - 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)
3C: Thursday Check-In ✅ COMPLETED
feat/v2-kpi — Merged- ✅ 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
apps/api/src/modules/kpi/kpi.service.ts → runThursdayCheckIn()3D: Client Health Tracking ✅ COMPLETED
feat/v2-client-health- ✅
ClientHealthServicewith 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
Phase 4: Reporting Dashboard + Polish
Goal: Admin dashboard, positive reinforcement, retrospectives.4A: Invisible Labor Logging ✅
feat/v2-remaining-gaps — COMPLETED- ✅
log_interventionLLM 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)
4B: Positive Reinforcement ✅
feat/v2-reinforcement — COMPLETED- ✅ 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
#winschannel (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
apps/api/src/modules/reinforcement/— service, controller, modulepackages/db/src/schema/reinforcements.ts— DB schematests/unit/reinforcement.test.ts— unit tests
4C: Action Item Tracking
- ✅ 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
4D: Admin Dashboard Updates
feat/dashboard-overhaul✅ COMPLETED — 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.5A: Checklist System ✅ COMPLETED
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
- No AI-slop present
- Topic makes sense
- Writing style appropriate
- Redirect URL added to polls
- Hyperlinks correct
- Images/media clickable
- Subject line options shared
- Scheduled/followed up on time
- 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
apps/api/src/modules/checklists/— service, controller- DB tables:
checklists,checklist_completions - Admin UI for checklist management
- Bot integration: checklist completion via Slack
5B: SOP Tracking ✅
feat/v2-sops — COMPLETEDAutomated tracking of recurring SOPs:Client SOP:- Weekly report on Monday
- Monthly report on last day of month
- Monthly call scheduled with each client
- Deadlines adhered
#oooprocess followed- Discussions in public channels
- Monthly 1:1 with ops/manager
- Reports updated every Monday
- Shared with respective clients after internal QC
- Internal sync (analytics call) for data-driven decisions
- 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
- 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:Items Missing from PRD (Identified During Analysis)
Things the current codebase has that the PRD doesn’t address, or gaps in the PRD itself:Effort Estimates by Phase
Worktree Strategy for Parallel Development
Each phase has independent workstreams that can be developed in parallel usingwt create:
Files That Will Be Modified (Existing)
These existing files will need changes (not just new files):Migration Strategy
- All new tables are additive — no existing tables are dropped
- Existing column additions are nullable or have defaults — no data loss
- Run migrations on staging first, verify with seed data
- Backfill strategy: Existing tasks won’t have type/size/client — mark as “unclassified” and let ops tag retroactively (or ignore historical data)
- 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
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.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.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.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.How It Maps to Our Existing Architecture
The multi-agent system does not require a rewrite. It builds on what we already have:Inter-Agent Communication
Agents don’t call each other directly. They communicate through events on BullMQ: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)
- 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
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
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