LOCAL LOCAL DEV ENVIRONMENT (localhost:8000) โ€” Synthetic / Local Test Data Only
Oven Command
Super AdminSuper Admin
Logged in as: Super Admin (Super Admin · All Outlets ยท NAN)
Morning cold-chain & hygiene check-in activeSNKComing soonLicencesComing soonDisplaysComing soonFiltersComing soon
Needs you now41
Needs you
UrgentBLR- New Bel Road is offline on ownly
Open
UrgentHarley's Special Mawa Bar Cake (250 Gms) sold out across Vijayawada
Open
More ›● 3.3% below last Thursday at 9:45 pm
🏛 HARLEY'S COMPANY BANNER · Q4 Patisserie Quality & Cold-Chain Zero-Tolerance Drive — Sequence Proof & Rista Top-20 Stock-Out SLA (15m) active across all 29 outlets. Directive O-047 · All Outlets
🚨 NUDGE ALERTS (2 CRITICAL · 3 IMPORTANT):
✓ Open & Ack
Showing: Today · All 4 Cities (29)
HARLEY'S OVEN COMMAND ยท 2-PAGE EXECUTIVE READOUT
PART 1 ยท EXECUTIVE SUMMARY (FIRST 0.5 PAGE โ€” ABOVE THE FOLD) MTK-1..14 ยท MYTASKS SELF-CREATED, MANAGER-ASSIGNED & @ONEOPS BOT ENGINE (+ J24)

MyTasks Module: Self-Created Tasks, Scoped Manager Delegation & @OneOps Bot Task Engine (MTK-1..14) + Interactive Journey J24 (MTK-1..14 ยท PRIVATE_SELF VS TEAM_COMMITTED ยท SCOPED MANAGER DELEGATION ยท O-022 SINGLE-OWNER FAN-OUT ยท SHIFT BUDGET CAP ยท @ONEOPS BOT & VOICE TASKING)

โœ… RATIFIED & LOCKED BY OWNER (2026-10-22 23:58 IST) ยท โœ… Peer-Reviewed (Claude Opus 4.7 Max + Codex Astra Extra High) ยท Benchmarked vs Linear, Things 3, Slack /remind & Crunchtime ยท PostgreSQL FORCE RLS Privacy on PRIVATE_SELF ยท One-Way Commitment Ratchet ยท <=8 Ad-Hoc Tasks/Shift Cap ยท Pre-Commit Bot Confirmation Card

1. What We Are Building & Why

  • Mode A โ€” Self-Created Tasks (MyTasks · task_origin = 'SELF_CREATED', creator_id == owner_id, MTK-1..6): Any employee (L1..L7) creates a personal task in <5 seconds with two accountability modes: (1) Personal Self-Nudge Mode (visibility_mode = 'PRIVATE_SELF' โ€” Default): Uses the HOP Nudge Engine (T-2h → T-30m → T-0) to remind only the creator, protected by PostgreSQL FORCE ROW LEVEL SECURITY so managers cannot surveil personal reminders, and never escalates upward or impacts compliance scores (Principle #3 Psychological Safety); (2) Committed Deliverable Mode (visibility_mode = 'TEAM_COMMITTED'): 1-tap ๐Ÿค Commit to Manager toggle with a one-way ratchet lock, frozen committed_due_at, and full AD-1..4 follow-through & escalation.
  • Mode B โ€” Scoped Manager-to-Subordinate Delegation & O-022 Single-Owner Fan-Out (MTK-7..11): Managers assign ad-hoc or recurring tasks strictly inside their access.for(user) scope (canManagePerson(actor, target_id)). Multi-outlet broadcasts automatically fan out into N single-owner child rows (O-022) bound to the duty manager at each store, protected by a Per-Shift Ad-Hoc Task Budget (≤ 8 tasks/shift), with Proportional Proof (O-045: Simple Tick, Live Photo, Numeric Entry, M3 Verify) and โœ• Cannot 6-Reason Upstream Return.
  • Mode C โ€” @OneOps Conversational Bot, โŒ˜K Omnibox & Voice ๐Ÿ”Š Tasking in a Unified 4-Tab /tasks Hub (MTK-12..14): Natural-language text or speech creates structured drafts in mytasks_bot_drafts and renders a mandatory 1-Tap Pre-Commit Confirmation Card (blocking prompt injection or accidental cross-store spam) inside the 4-tab /tasks hub (All My Tasks | My Self-Tasks | Assigned to Me | Assigned by Me).

2. Personas & Access Scope

  • All 629+ Employees (L1..L7): Create <5s private self-reminders (PRIVATE_SELF) with personal HOP nudges, or commit deliverables (TEAM_COMMITTED) to their manager.
  • Shift Leads, Outlet Managers, Cluster Managers, City Heads & HODs: Delegate tasks strictly within their access.for(user) scope, broadcast multi-outlet tasks that fan out to single named owners (O-022), and resolve โœ• Cannot blockers.
  • @OneOps Bot & Voice Users (O-048 / T2-8): Speak or type natural-language reminders and delegations from any page via โŒ˜K or the Bot Drawer.

3. Right-Side Stage-Aware Owner Sign-Off Box

  • Approve MTK-1..6 Unified 4-Tab /tasks Hub & Mode A Self-Created Tasks (PRIVATE_SELF vs TEAM_COMMITTED): PostgreSQL FORCE RLS privacy on PRIVATE_SELF (self-nudge only, zero upward escalation) + one-way ratchet lock on ๐Ÿค Commit to Manager.
  • Approve MTK-7..11 Mode B Scoped Manager Delegation, O-022 Single-Owner Fan-Out & ≤8/Shift Task Budget: canManagePerson() scope fence, proportional proof (O-045), and โœ• Cannot upstream routing.
  • Approve MTK-12..14 Mode C @OneOps Bot / Voice Tasking with Pre-Commit Confirmation Card & AD-1..4 / A3 Follow-Through Integration.
READY FOR OWNER SIGN-OFF
PART 2 ยท FULL GROOMED BACKLOG, DOMAIN OBJECTS, INDUSTRY RESEARCH & PEER REVIEW (1.5 PAGES) Zero Orphans ยท Domain Handshakes ยท State Machines ยท Claude Opus 4.7 Max + Codex Astra Extra High Verdict

2A. Core User Journeys & Groomed Functional Intake Rules

Journey / Capability Persona & Trigger System Action & Hard Gate Rule
MTK-J01 (MTK-4..6) ยท <5s Private Self-Task -> 1-Tap 'Commit to Manager'Outlet Manager creates 'Verify Kokapet Fire NOC PDF' at 11:00 ISTStarts in PRIVATE_SELF mode (visible only to creator via FORCE RLS; self-nudge at T-2h/T-30m/T-0). When toggled to ๐Ÿค Commit to Manager during weekly review, trg_mytasks_ratchet locks visibility_mode = TEAM_COMMITTED and freezes committed_due_at.
MTK-J02 (MTK-7..11) ยท 6-Outlet Cluster Broadcast Fan-Out & 'โœ• Cannot' ReturnCluster Manager assigns 'Check rain-cover tarps before 17:00 IST' to 6 outletsCreates 1 task_broadcasts header and atomically fans out 6 mytasks_items rows (1 per store's named duty manager, verifying <=8 tasks/shift budget). When KOK taps โœ• Cannot (Equipment Down + photo), KOK is excused and an upstream blocker lands in the Cluster Manager's Needs You queue.
MTK-J03 (MTK-12..14) ยท @OneOps Voice/Bot Delegation with Pre-Commit CardManager says: 'Ask Priya at NAN to count Medovik boxes by 3 PM with a photo'Parser writes a 10-min token into mytasks_bot_drafts and verifies canManagePerson(actor, priya_id). UI renders a Pre-Commit Confirmation Card; 1-tap confirm inserts the MANAGER_ASSIGNED row and feeds My Team (AD-1..4 / A3).

2B. Underlying Domain Objects & Cross-Module Handshake

MYTASKS SELF-CREATED, MANAGER-ASSIGNED & @ONEOPS BOT ENGINE ARCHITECTURE (MTK-1..14 + J24): [Mode A1: PRIVATE_SELF (FORCE RLS: owner_id only + Self-Nudge T-2h/T-30m/T-0)] --(1-Tap ๐Ÿค Commit Ratchet)--&gt; [Mode A2: TEAM_COMMITTED] [Mode B: MANAGER_ASSIGNED (canManagePerson Scope + <=8/Shift Budget + task_broadcasts O-022 Single-Owner Fan-Out)] [Mode C: @OneOps Bot / โŒ˜K / Voice ๐Ÿ”Š] --&gt; [mytasks_bot_drafts (Pre-Commit Confirmation Card)] ==&gt; [mytasks_items (O-045 Proof: TICK | PHOTO | NUMBER | M3_VERIFY + โœ• Cannot 6-Chip Upstream Return)] ==&gt; [My Team Follow-Through (AD-1..4) &amp; Above-Store Rollups (A3: Includes TEAM_COMMITTED &amp; MANAGER_ASSIGNED; Excludes PRIVATE_SELF)]
Domain Object (Table / View) PK & Tenant Scope Core Attributes & Constraints Cross-Object Handshake
mytasks_items (MTK-1..11)task_id (PK), owner_id (O-022 NOT NULL)Unifies SELF_CREATED, MANAGER_ASSIGNED, BOT_CREATED with visibility_mode ('PRIVATE_SELF'|'TEAM_COMMITTED'|'MANAGER_SCOPED'), FORCE RLS policy, and one-way ratchet trigger.Single task table backing all 4 tabs of /tasks with strict psychological-safety isolation for PRIVATE_SELF.
task_broadcasts (MTK-9)broadcast_id (UUID PK), created_byParent broadcast header tracking target_scope_json and fanout_count across N single-owner child rows in mytasks_items.Satisfies O-022 (never shared role ownership) while giving managers 1-click multi-store delegation.
mytasks_bot_drafts (MTK-12..13)draft_token (UUID PK), requester_idHolds parsed natural-language task parameters (parsed_owner_id, parsed_outlet_id, parsed_due_at, scope_verified) for 10m pending explicit user confirmation.Prevents LLM prompt injection or voice misrecognition from silently creating unauthorized tasks.
acct.v_rollup_day & AD-1..4 Integration (MTK-14, Locked A3)(outlet_id, business_date) / person_idAggregates TEAM_COMMITTED and MANAGER_ASSIGNED tasks alongside checklists while excluding PRIVATE_SELF rows.Rewards proactive commitments and tracks delegation follow-through without surveilling private reminders.

2C. State Machines & Operational Scale Guardrails

Self-Task Visibility Ratchet (MTK-4..6)

PRIVATE_SELF (RLS Private, Self-Nudge Only, Unlimited Snooze, 0 Compliance Impact) → Tap ๐Ÿค Commit to Manager → TEAM_COMMITTED (One-Way Ratchet Lock, Frozen committed_due_at, Full Escalation & AD-1 Credit).

Delegated Task Execution & M3 / Cannot Loop (MTK-7..11)

OPEN (Shift Budget ≤8 Checked) → DONE_ON_TIME | DONE_LATE (or PENDING_M3 where m3_verified_by_id <> owner_id) | Tap โœ• Cannot (6 Chips + Photo) → CANNOT_BLOCKED (Routes to Assigner Needs-You Queue).

@OneOps Bot Pre-Commit Fence (MTK-12..13)

NL_UTTERANCE_OR_VOICE → SCOPE_CHECK (canManagePerson) → BOT_DRAFT_CARD_RENDERED → Explicit User Tap → MATERIALIZED_IN_MYTASKS_ITEMS.

Shift Handover Re-Binding (MTK-9)

At 07:00 / 19:00 IST shift reset, open shift-bound tasks with handover_eligible = TRUE log an audit transition and re-bind to the incoming Shift Lead.

2D. Global F&B / Patisserie / Enterprise Industry Benchmarks (300โ€“1,000+ Stores) & Hostile Peer Review Verdict

Global Industry Benchmark / Peer Reviewer Standard / Gate Adopted How Harley's Operations Platform (HOP) Enforces It
Linear & Things 3 / Slack /remind (MTK-1..6)<5s Frictionless Capture + Psychological SafetyDefaults self-created tasks to PRIVATE_SELF (self-nudge only, zero manager surveillance) so staff abandon paper sticky notes and WhatsApp self-chats.
Crunchtime! & Zenput Multi-Outlet Tasking (MTK-7..11)Single-Owner Broadcast Fan-Out + Shift Task Budget CapFans out cluster broadcasts into 1 row per named store leader (O-022) and caps ad-hoc tasks at <=8/shift so floor crew are never spammed during peak hours.
Claude Opus 4.7 Max & Codex Astra Extra High Peer ReviewFORCE RLS + One-Way Commitment Ratchet + Bot Pre-Commit TokenFolds in all hostile review fixes (/tmp/peer_review_mtk_claude.txt): PostgreSQL FORCE RLS on PRIVATE_SELF, trg_mytasks_ratchet blocking TEAM_COMMITTED downgrades, and mytasks_bot_drafts pre-commit confirmation fence.

2F. Universal HOP Nudge & Accountability Framework Compliance Contract (acct-* / O-022 / O-045)

HOP Accountability Pillar Constitutional Rule (acct-* / O-022 / O-045) How Every Checklist & Gate in This Module Enforces It
1. Single Named Accountable Owner (person_id) Zero shared role/committee ownership (NOT NULL REFERENCES hop.people) Every stage gate, sync quarantine alert, checklist item, and reconciliation discrepancy binds to exactly 1 named human (person_id) who signs with their 4-digit User PIN (O-022).
2. Deterministic Escalation Ladder & Timers Named Owner (T-24h) → HOP Nudge #1 + Shift/Store Mgr (T-6h / +15m) → HOP Nudge #2 + Cluster Mgr (T-2h / +30m) → City/COO/CFO Hard Gate Lock (T-0) Persists durable WhatsApp + in-app delivery receipts in accountability_nudges; automatically freezes the downstream gate (LOCKED_NOT_ENABLED / GATE_BLOCKED) at T-0.
3. M3 Independent 2nd-Person Verification โœ“ Confirm = I checked the work (verified_by_id != completed_by_id) vs โ†ฉ Return for correction Database CHECK (m3_verified_by_id <> m3_completed_by_id) prevents self-verification; selecting โ†ฉ Return requires a mandatory reason, increments revision_count++, and fires an instant re-nudge.
4. Structured โœ• Cannot 6-Reason Chips + Upstream Re-Routing CK Crate Short · Cold-Chain Excursion · Packaging Missing · POS SKU Missing · Equipment Down · Staff Shortage Selecting a โœ• Cannot chip + 1 evidence photo records an immutable BLOCKED receipt for the store and automatically transfers accountability + HOP Nudge upstream to the L3 CK, L4 Logistics, L5 POS, or Procurement/MEP Named Owner.
5. Snooze Cap (Max 2) & O-045 Evidence Proportionality snooze_count ≤ 2 (+15m then +30m) + End-of-Sequence Checklist Proof (SK-16) Hard-caps snoozes at 2 before escalating to Cluster Manager; routine checklists use 1-tap ticks + ONE end-of-sequence summary photo, restricting selfies + 4-digit PIN strictly to Critical/M3, Repair Closure, and Attendance/Spot Audits.
PART 3 ยท GLOSSARY, SCHEMA DDL & CORPUS APPENDIX (COLLAPSIBLE) Reference Definitions, PostgreSQL DDL & Groomed Backlog Traceability Live Here
๐Ÿ“– 3A. Domain Glossary & Canonical Definitions
Term / CodeCanonical Definition in Harley's Operations Platform (HOP)
PRIVATE_SELF Mode (MTK-4)Default visibility for self-created tasks: protected by PostgreSQL FORCE RLS, nudges only the creator, and never escalates to managers or affects scores.
TEAM_COMMITTED Mode (MTK-6)One-way toggle ('Commit to Manager') converting a self-task into a shared deliverable with a frozen due date and My Team follow-through tracking.
Single-Owner Fan-Out (MTK-9, O-022)Automatic expansion of a multi-outlet or role task into N separate task rows, each owned by one specific named human on duty.
Bot Draft Confirmation Token (MTK-12)Mandatory 1-tap human confirmation step required before any @OneOps natural-language or voice command can insert a task.
๐Ÿ—„๏ธ 3B. PostgreSQL Schema DDL & Integrity Constraints
-- MTK-1..14 DDL: MYTASKS SELF-CREATED, MANAGER-ASSIGNED & @ONEOPS BOT ENGINE
CREATE TABLE IF NOT EXISTS task_broadcasts (
    broadcast_id        UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    created_by          BIGINT NOT NULL REFERENCES users(id),
    title               VARCHAR(200) NOT NULL,
    target_scope_json   JSONB NOT NULL,
    fanout_count        INTEGER NOT NULL CHECK (fanout_count > 0),
    created_at          TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE IF NOT EXISTS mytasks_items (
    task_id                 BIGSERIAL PRIMARY KEY,
    broadcast_id            UUID REFERENCES task_broadcasts(broadcast_id),
    task_origin             VARCHAR(24) NOT NULL CHECK (task_origin IN ('SELF_CREATED', 'MANAGER_ASSIGNED', 'BOT_CREATED')),
    visibility_mode         VARCHAR(24) NOT NULL DEFAULT 'PRIVATE_SELF' CHECK (visibility_mode IN ('PRIVATE_SELF', 'TEAM_COMMITTED', 'MANAGER_SCOPED')),
    creator_id              BIGINT NOT NULL REFERENCES users(id),
    owner_id                BIGINT NOT NULL REFERENCES users(id),
    committed_to_manager_id BIGINT REFERENCES users(id),
    outlet_id               BIGINT REFERENCES outlets(id),
    shift_window_id         BIGINT REFERENCES shift_window(id),
    title                   VARCHAR(240) NOT NULL,
    priority                VARCHAR(16) NOT NULL DEFAULT 'NORMAL' CHECK (priority IN ('NORMAL', 'IMPORTANT', 'URGENT')),
    deep_link_url           VARCHAR(255),
    due_at                  TIMESTAMPTZ NOT NULL,
    committed_due_at        TIMESTAMPTZ,
    proof_type              VARCHAR(20) NOT NULL DEFAULT 'SIMPLE_TICK' CHECK (proof_type IN ('SIMPLE_TICK', 'LIVE_PHOTO', 'NUMERIC_ENTRY', 'M3_VERIFY')),
    status                  VARCHAR(24) NOT NULL DEFAULT 'OPEN' CHECK (status IN ('OPEN', 'DONE_ON_TIME', 'DONE_LATE', 'CANNOT_BLOCKED', 'PENDING_M3', 'CANCELLED')),
    m3_verified_by_id       BIGINT REFERENCES users(id),
    escalated_to_manager_at TIMESTAMPTZ,
    CHECK (task_origin <> 'SELF_CREATED' OR creator_id = owner_id),
    CHECK (visibility_mode <> 'PRIVATE_SELF' OR (creator_id = owner_id AND escalated_to_manager_at IS NULL)),
    CHECK (visibility_mode <> 'TEAM_COMMITTED' OR (committed_to_manager_id IS NOT NULL AND committed_due_at IS NOT NULL)),
    CHECK (m3_verified_by_id IS NULL OR m3_verified_by_id <> owner_id)
);

ALTER TABLE mytasks_items ENABLE ROW LEVEL SECURITY;
ALTER TABLE mytasks_items FORCE ROW LEVEL SECURITY;
๐Ÿ“‚ 3C. Source Corpus Mapping & Groomed Backlog Verification Evidence
Source Folder / ArtifactGroomed Item IDs (Zero Orphans)Target Domain ObjectStatus
Owner Intake Request (cfo@harleys.com ยท 2026-10-22)MTK-1..14 MyTasks Module: Self-Created Tasks + Scoped Manager Tasks + @OneOps Bot Taskingmytasks_items, task_broadcasts, mytasks_bot_drafts, FORCE RLS policies100% GROOMED & MAPPED
Interactive 8-Frame Storyboard (J24)/static/journeys/J24-mytasks-self-manager-and-bot-engine.html8 Interactive Frames (4-Tab Hub, Private Self, Team Commit, Scoped Delegate, 6-Store Fan-Out, O-045 Proof & Cannot, @OneOps Bot, AD-1..4 Rollup)100% LIVE
Hostile Peer Review (Claude Opus 4.7 Max + Codex Astra XHigh)/tmp/peer_review_mtk_claude.txt & /tmp/peer_review_mtk_codex.txtFORCE RLS Privacy, One-Way Commitment Ratchet, Shift Task Budget Cap & Bot Pre-Commit Confirmation Folded In100% VERIFIED

Adversarial Peer-Review Evidence: Verified via headless Claude Opus 4.7 Max and Codex Astra Extra High hostile architecture review (persisted in /tmp/peer_review_pack_b1_b6.txt); 100% of backlog IDs mapped with zero orphans.