Files
2026-07-30 14:35:52 +08:00

4.8 KiB
Raw Permalink Blame History

Product Requirements Document (PRD)

SOP Governance Tool — Stage 1 (Single-Tenant)

Version: 1.0 · Scope: Stage 1 of the Solo-Founder Roadmap · Parent docs: BRD v1.1, Solo-Founder Roadmap


1. Purpose

A web application for ONE company (the founder's own 3PL warehouse) that replaces the manual Stage-0 concierge workflow: create governed SOPs with AI assistance, approve them, distribute them to staff in their language, and collect signed acknowledgements with an audit trail.

This is a learning-and-validation build. It must be simple enough for a beginner developer (working with Claude Code) to build in 34 months at 1015 hrs/week, while laying foundations (org_id everywhere, RLS) that make the Stage-2 SaaS an evolution rather than a rewrite.

2. Problem Statement

Today (Stage 0), the founder delivers SOP governance manually: AI chat for drafting, Word templates, WhatsApp for distribution, screenshots + a Google Sheet for acknowledgement records. It works and earns money, but it doesn't scale past ~3 clients and consumes founder hours on clerical work.

3. Goals & Non-Goals

Goals

  1. Replace the manual workflow for the founder's own warehouse (tenant #1).
  2. SOP lifecycle: Draft → Submitted → Approved → Published, with version history.
  3. Staff view SOPs on their phones in their language (EN / BM / 中文) and acknowledge with one tap.
  4. Dashboard showing acknowledgement % per SOP and per department.
  5. AI assistance: draft an SOP from a description; translate an approved SOP.
  6. Every governance action recorded in an audit log.
  7. Staff can report operational incidents (problem + severity + photo, optionally linked to an SOP); approver/admin review and close them, feeding SOP revisions.

Non-Goals (explicitly out — do not build)

  • Multi-tenancy UI, billing, subscriptions, self-serve signup
  • WhatsApp Business API integration (Stage 1.5 — staff access via a link for now)
  • Checklists, evidence capture, training/quizzes, RACI, flow diagrams
  • Incident escalation chains, SLA timers, incident alerts (the incident log is capture-and-review only)
  • Custom roles, SSO, configurable approval chains (fixed 1-level approval only)
  • Native mobile app (mobile-first web only)
  • DOCX/PDF import (paste text instead)

4. Users & Roles (fixed set)

Role Who Can do
Admin The founder Everything: manage users/departments, edit/approve/publish any SOP, view dashboard & audit log
Approver Ops manager / dept head Approve or reject submitted SOPs in their scope; view dashboard
Editor Supervisors Create/edit drafts, submit for approval, use AI draft/translate
Staff Frontline workers View published SOPs assigned to them (own language), acknowledge

One user has exactly one role (keep it simple). Admin can change a user's role.

5. Core User Stories

  1. As an Editor, I describe a process in plain language and get an AI-drafted SOP I can edit, so drafting takes minutes not days.
  2. As an Editor, I submit a draft; the Approver gets it in their queue and approves or rejects with a comment.
  3. As an Admin, publishing an approved SOP creates version 1.0 (or increments), assigns it to selected departments, and freezes that version's content.
  4. As a Staff member, I open a link on my phone, see the SOP in my preferred language with large readable steps, and tap "I have read and agree" — recording my name, the version, language, and timestamp.
  5. As an Admin, I see per-SOP and per-department acknowledgement % and can export the acknowledgement list.
  6. As an Approver, I can view any prior version of an SOP and who approved it.
  7. As a Staff member, when something goes wrong on the floor, I report it from my phone in under a minute — with a photo — and the Admin sees which SOPs keep generating problems and revises them.

6. Success Metrics (Definition of Done for Stage 1)

  • Founder's warehouse runs on it: ≥ 20 published SOPs, ≥ 80% staff acknowledgement.
  • An SOP goes from idea → published in under 1 hour including approval.
  • Zero manual screenshot/Sheet work remains for tenant #1.
  • A non-technical Approver and a Staff member can use it with no training beyond one WhatsApp message.
  • Audit log answers: who created, edited, approved, published, acknowledged — with timestamps.

7. Constraints & Principles

  • Stack is fixed: Next.js (App Router) + Supabase + Vercel + Anthropic API. No substitutions.
  • Beginner-maintainable: prefer boring, well-documented patterns over clever ones.
  • org_id on every table from day one, with RLS. Single-tenant today, SaaS-ready tomorrow.
  • AI is server-side only. No API keys in the browser. AI never auto-publishes.
  • Mobile-first for Staff screens; desktop-first for Admin/Editor screens.
  • English UI for admin screens; SOP content is multilingual (EN/BM/ZH).