02-Product-Definition: OS Blueprint
Status: ✅ ACTIVE Purpose: SSOT for all MVP phases, linked from Strategy (01), Technical Spec (05), and AI Features (04)
Overview
This section defines What We Build across three phases. Each workflow maps directly to the three tracked core workflows in the North Star metric (FWCR):
| # | Workflow | FWCR Category | Phase |
|---|---|---|---|
| 1 | Invoice → ZATCA clearance | Invoice-to-Cash | Phase 2 |
| 2 | Expense → approval → payment | Expense-to-Pay | Phase 3 |
| 3 | PO → receive → pay | PO-to-Payment | Phase 3 |
Phase 1: Blueprint (Current)
Duration: Q1 2025 Goal: Define product, architecture, and compliance requirements
Deliverables
-
00-overview/- OS Constitution, PDLC -
01-strategy/- Executive Summary, North Star, Vision -
02-product-definition/- This section (SSOT) -
03-compliance/- ZATCA Phase 2, PDPL, GOSI, VAT -
04-ai-features/- RAG Architecture, Tool Registry -
05-technical-spec/- SAD, SRS, Data Model -
06-ui-design/- UX Strategy, Design System -
07-operations/- Security, Observability, Runbooks -
08-release/- All 8 phase documents
Exit Criteria
- All sections documented
- Cross-references established
- Architecture boundary defined (ERPNext + custom apps)
- Compliance requirements locked
Phase 2: Forge (Invoice-to-Cash)
Duration: Q2-Q3 2025 Goal: Build and ship ZATCA Phase 2 compliant Invoice-to-Cash workflow
Core Deliverables
| # | Document | Status | Owner |
|---|---|---|---|
| 1 | Sales Quotation → SO workflow | Planned | Product |
| 2 | ZATCA XML generation | Planned | Engineering |
| 3 | ZATCA clearance API integration | Planned | Engineering |
| 4 | Fatoora portal submission | Planned | Engineering |
| 5 | AI Error Resolution Assistant | Planned | AI Team |
| 6 | PDF attachment to cleared invoice | Planned | Engineering |
| 7 | Liquid Glass UI for invoicing | Planned | Frontend |
| 8 | RBAC workspace configuration | Planned | Product |
User Stories
Scenario: ZATCA Invoice Clearance
Given an accountant has filled all mandatory fields
When they click "Submit"
Then the system generates XML, retrieves ZATCA stamp, attaches cleared PDF
Scenario: ZATCA Validation Error
Given an invoice is missing required fields
When they click "Submit"
Then the AI translates errors into plain-English instructions
Compliance Requirements
- ZATCA Phase 2 cryptographic stamping
- WPS (Wage Protection System) for payroll
- PDPL data residency (OCI Riyadh/Jeddah)
- Native Arabic RTL support
- Hijri calendar integration
Success Metrics
- FWCR for Invoice-to-Cash: >65%
- Time-to-ZATCA clearance: under 2 seconds
- ZATCA rejection rate: under 5%
Phase 3: Aesthetic (Expense-to-Pay + PO-to-Payment)
Duration: Q4 2025 Goal: Expand to full P2P cycle with approval workflows
Core Deliverables
| # | Document | Status | Owner |
|---|---|---|---|
| 1 | Purchase Invoice workflow | Planned | Product |
| 2 | AI OCR for vendor receipts | Planned | AI Team |
| 3 | Expense approval routing | Planned | Engineering |
| 4 | PO → GRN → Vendor Bill flow | Planned | Engineering |
| 5 | Multi-tier approval workflows | Planned | Product |
| 6 | Bank reconciliation automation | Planned | Engineering |
| 7 | Payment batch generation | Planned | Engineering |
| 8 | Payment run integration (SADAD) | Planned | Engineering |
User Stories
Scenario: AI OCR Invoice Processing
Given a user uploads a vendor PDF invoice
When upload completes
Then the AI extracts Vendor Name, VAT Number, Date, Amount into draft Purchase Invoice
Scenario: Expense Approval Flow
Given an employee submits an expense report
When amount exceeds threshold
Then system routes to manager for approval
And notifies finance upon approval
And initiates payment batch
Scenario: PO-to-Payment
Given a PO has been fully received
When finance initiates payment run
Then system generates SADAD-compatible batch file
And posts journal entries to GL
Success Metrics
- FWCR for Expense-to-Pay: >65%
- FWCR for PO-to-Payment: >65%
- AI OCR accuracy: >95%
- Approval cycle time: under 4 hours
Phase 4: Builder
Duration: Q1 2026 Goal: Inventory, HR, and project accounting
Core Deliverables
- Inventory management (stock, warehouse, batches)
- HRMS with GOSI payroll
- Project costing and timesheets
- Customer portal