How Larry worksEvery input mapped to its flow. Every flow ends with you informed or it being properly tracked.
Right now
All runs in last 24h succeeded
6 things need your attention
Click each below to review.
Where Larry hears from
๐Ÿ’ฌSlack DM

Anyone DMing @Larry in Slack โ€” staff, you. Routed to slack-dm-handler.

@๏ธSlack mention

@Larry in any channel he's in (#larry-page is the home). Routed to slack-mention-handler.

โœ‰๏ธGmail

New email to larry@formia.co.nz. Pub/Sub push โ†’ inbox-triage on each message.

๐ŸŒWelcome portal

New hire submits at welcome.formia.co.nz/<token> โ€” Larry notified, manager DM'd.

โฐCron schedules

Pulse survey (4pm weekdays), weekly digests, daily project sweep, monthly bills.

๐Ÿ‘†Manual trigger

You hitting a button on the dashboard โ€” /tasks page, individual run-now buttons.

๐Ÿ”Webhooks

Slack interactive buttons (approve/decline), Gmail Pub/Sub. All auth-verified.

๐Ÿค–Self-triggered

One run can enqueue another โ€” e.g. inbox-triage of an invoice โ†’ file follow-up.

What Larry can act on
People
  • Onboarding
    Create record ยท email portal link ยท track signed contracts ยท digital sign IR330/KS2 ยท iPayroll-ready PDF
  • Pulse survey
    2 staff/weekday rotation ยท question bank ยท sentiment tracking ยท weekly digest
  • Leave management
    Request, approve, decline ยท balance tracking ยท iPayroll alignment
  • Tool allowance
    Per-staff balance, request log, top-ups
  • Vehicle reminders
    Per-vehicle WOF/REGO/service due dates
  • H&S compliance
    Toolbox talks, induction tracking, cert expiry
  • Incident reporting
    Log, notify Mark + Ben, cross-link to leave if time-off mentioned
Documents + email
  • Drive search + read
    Find files by path or query ยท extract text from PDFs (with OCR) and Word docs ยท parse spreadsheets
  • Drive write + edit
    Upload new files ยท update existing ยท find/replace in .docx ยท set/append cells in .xlsx
  • Gmail triage
    Every inbound classified โ€” invoice / supplier / staff / for-rohan / junk / etc.
  • Gmail send + reply
    Auto-replies on internal/known-thread mail ยท proposes on external first-contact
  • File-as-you-go
    Invoices โ†’ /finance/incoming/YYYY-MM/ ยท contracts โ†’ staff HR folders ยท etc.
Memory + projects
  • Semantic memory
    Persistent facts about people, suppliers, decisions, preferences. Searchable across runs.
  • Episodic events
    Every action Larry takes is logged with trace + payload. Full audit history.
  • Projects
    Open follow-ups with owner + next-review date. Daily sweep nudges overdue ones.
  • Entities
    Staff, suppliers, customers, vehicles, properties โ€” single source of truth.
Safety + governance
  • Approval queue
    High-risk actions (external email, deletions) wait for your tap-to-approve.
  • Kill switches
    Per-tool toggles in /settings โ€” flip e.g. xero-write off if you want a freeze.
  • HR access tiers
    Staff can see own data only ยท managers see their company ยท admin (you) sees all.
  • Audit trail
    Every event in /events. Every run in /runs. Every memory has provenance.
  • Approval policy
    Per-tool YAML rules (config/approval-policy.yaml). Predicates checkable in code.
The major flows
New starter onboarding
  1. 1
    You
    DM Larry: 'Tony Wall starts Tuesday at BWJ as salesperson, Ben's his manager'
  2. 2
    Larry
    onboarding.create โ€” seeds 32-item role-aware checklist
  3. 3
    Larry
    onboarding.sendWelcomeEmail โ€” emails Tony from larry@ with magic link
  4. 4
    Tony
    Opens welcome.formia.co.nz/<token> on his phone, fills paperwork, digitally signs
  5. 5
    Larry
    Auto-DMs you + Ben on Slack with summary + still-needed list
  6. 6
    You
    Open /onboardings/<id>, click Download PDF, paste fields into iPayroll
  7. 7
    Ben
    Walks Tony through H&S induction items on day one โ€” tick off as done
  8. 8
    Larry
    30 + 90 day review reminders fire automatically as Slack DMs
Safety net: Magic link expires in 30 days. Manager can Reopen the form post-submit. Signed docs auto-file to Drive.
Email arrives
  1. 1
    Gmail
    Pub/Sub push fires the moment anything lands
  2. 2
    Webhook
    Filters out obvious noise (no-reply senders, Slack notification mail, marketing) โ€” events.email.skipped
  3. 3
    Larry
    inbox-triage runs on the rest โ€” reads, classifies, retrieves relevant memory
  4. 4
    Larry
    Acts: file invoice / reply / file to Drive / propose for approval / DM you on Slack
  5. 5
    Larry
    Always archives + marks read after acting. NEVER leaves anything sitting in his inbox.
Safety net: If Larry can't decide, he DMs you with one-line summary + email link + recommended action. You triage from Slack, not email.
Slack DM arrives
  1. 1
    Anyone
    DMs @Larry in Slack โ€” staff with a leave request, you with an instruction, etc.
  2. 2
    Webhook
    Verifies HMAC signature, checks recent-history dedup, enqueues a run
  3. 3
    Larry
    slack-dm-handler โ€” checks access tier, reads relevant skill (leave / incident / etc.)
  4. 4
    Larry
    Acts via the right tools โ€” capture data, log to DB, file artefacts in Drive
  5. 5
    Larry
    Replies in the same DM with what was done + proof links
Safety net: Silent-exit guard: every Slack-triggered run MUST reply or Larry posts a 'on a break' fallback. You never sit in silence.
Incident reported
  1. 1
    Staff
    DMs Larry: 'I cut my hand on the saw', 'There was a near-miss with the forklift'
  2. 2
    Larry
    incident.log โ†’ row in incidents table, visible on /incidents immediately
  3. 3
    Larry
    DMs Mark Bidlake (H&S lead) every incident ยท DMs you + Mark for injuries ยท flags WorkSafe-notifiable
  4. 4
    Larry
    If description mentions time off ('off for 1 week') โ€” auto-prompted to also leave.request
Safety net: Cross-skill enforcement: incident.log detects time-off phrases and forces leave request in the same run. No more 'I forgot to log the leave too'.
Pulse survey
  1. 1
    Cron
    Mon-Fri 4pm โ€” pulse-survey-afternoon fires
  2. 2
    Larry
    Picks 2 most-overdue staff, picks each a question they haven't seen recently
  3. 3
    Larry
    DMs each privately. Records pulse.question_sent event.
  4. 4
    Staff
    Replies in their DM (or doesn't โ€” that's logged too)
  5. 5
    Larry
    slack-dm-handler matches the reply via pulse.recordResponse, writes pulse_responses row
Safety net: Visible on /pulse โ€” sentiment grid by staff ร— cycle. Up-next strip shows who's likely next.
Approval queue
  1. 1
    Larry
    Tries to do something that policy says 'propose, don't auto-run' (e.g. send external email)
  2. 2
    Approval policy
    Per-tool rules in config/approval-policy.yaml decide auto vs propose vs forbidden
  3. 3
    Larry
    action.propose creates a row in /approvals with the payload + rationale
  4. 4
    Slack
    Larry DMs you a card โ€” Approve / Decline buttons inline
  5. 5
    You
    Tap Approve โ€” Larry executes the proposed action and reports back. Tap Decline โ€” Larry acknowledges.
Safety net: Pending approvals appear in the sidebar badge. Auto-expire after 72h with a notification to you.
A run fails
  1. 1
    Anything
    A tool errors mid-run ยท Anthropic times out ยท Larry's code throws ยท etc.
  2. 2
    Runner
    Catches the error, sets task_run.status = 'failed', logs run.failed event
  3. 3
    Larry
    If trigger was Slack โ€” posts 'on a break' fallback to original channel (you never sit in silence)
  4. 4
    alertRohan
    DMs you with: error message, trace id, who triggered it, link to /runs/<id>
  5. 5
    You
    Open the run, see exact tool calls + responses. Fix root cause if needed.
Safety net: Pre-run failures (insert errors before the run logs) ALSO post a fallback. Every failure has a Rohan-visible breadcrumb.
How nothing falls through the cracks
๐Ÿ›ŸSilent-exit guard

Every Slack-triggered run MUST end with a user-visible reply. If the model tries to silently exit, Larry posts a fallback message. You never sit in silence after a DM.

๐Ÿ””Pre-run failure fallback

If the runner crashes BEFORE creating a task_runs row (e.g. schema migration race), the queue handler posts an 'on a break' message to the trigger channel + DMs you the error.

๐Ÿ“จalertRohan on every failure

Every failed run DMs you in Slack: error class, trace id, triggering user, HTTP code, link to /runs/<id> for full call log. No silent failures.

โœ…Approval queue

High-risk actions (external email, deletions, irreversible writes) are proposed not executed. You tap Approve in Slack to action them. Auto-expire 72h with a nudge.

๐Ÿ“‹Project follow-up tracking

Every 'I'll get back to you on this' creates a project.upsert row with a next-review date. Daily project sweep DMs you on overdue items so nothing stalls forever.

๐ŸงนStale-run sweeper

Any task_run sitting in 'running' state >20 min gets auto-marked failed (probably crashed mid-execution). Runs every drain cycle so the dashboard never lies.

๐Ÿ”Cross-skill enforcement

Tools detect when their work implies another workflow โ€” e.g. incident.log spotting 'off for a week' forces a leave.request in the same run. Documented in house-rules ยง4.

๐Ÿ“œFull audit trail

Every action is an event row (kind, payload, traceId, taskRunId). Every run is a task_runs row with cost + tool calls + summary. Drillable from /runs and /events.

๐ŸงชClaims must match actions

House rule: Larry can't say 'done' without proof โ€” every claim cites the receipt (Drive link, Slack ts, DB row id, gmail message id). Catches hallucinated 'I filed it'.

๐Ÿ“คInbox surfaces via Slack

Larry's email inbox is internal โ€” you never read it. Anything needing your attention appears as a Slack DM with summary + email link + recommended action.

If you're worried something's stuck: the four counters above (approvals, leave, incidents, overdue projects) are the human-action queues. When all four are zero, nothing is waiting on you. The "failed runs in 24h" pill at the top tells you if Larry's machinery itself is healthy. Every sidebar item also carries a live badge for its own queue.