7.8 KiB
7.8 KiB
M4 Roadmap CSV Schema Reconciliation
Status: Draft for implementation alignment
Date: 2026-02-25
Owner: Technical Lead
1) Why this exists
We reviewed the original product-roadmap exports to confirm that the target schema can support all stakeholder lanes as the platform grows.
This avoids two failure modes:
- Building command APIs on top of a schema that cannot represent required workflows.
- Hard-coding today's customer setup in a way that blocks future staffing companies.
2) Inputs reviewed
All 13 roadmap exports from /Users/wiel/Downloads:
Krow App – Roadmap - Business App_ Google, Nvidia.csvKrow App – Roadmap - Client_ Google, Nvidia.csvKrow App – Roadmap - Compass- The Operator.csvKrow App – Roadmap - Employee App.csvKrow App – Roadmap - Features.csvKrow App – Roadmap - FoodBuy- Procurement.csvKrow App – Roadmap - KROW Dashboard.csvKrow App – Roadmap - Offenses.csvKrow App – Roadmap - Partner.csvKrow App – Roadmap - Roadmap.csvKrow App – Roadmap - Sectors_ BA, Flik ( The executors).csvKrow App – Roadmap - The Workforce_ Employees.csvKrow App – Roadmap - Vendor_ Legendary (Staffing).csv
Parsed signal:
- 983 non-empty task lines.
- 1,263 planning rows with task/status/priority/reference signals.
3) What the roadmap is clearly asking for
Cross-file recurring capabilities:
- Multi-party org model: client, operator, vendor, procurement, workforce, partner, sector execution.
- Orders and shift operations: recurring events, assignment, coverage, schedule management.
- Attendance and policy enforcement: clock-in/out, no-show, tardiness, cancellation, offense ladders.
- Compliance and document verification: certifications, insurance, legal docs, renewals, risk alerts.
- Finance and settlement: invoice lifecycle, disputes, remittance, payment history, aging, payroll/earnings.
- Reporting and prediction: dashboards, KPI, forecasting, scenario planning.
Repeated examples across many sheets:
Vendor Onboarding,Service Locations,Compliance,Certifications.All Invoices (Open/Pending/Overdue/Paid...),Payment Summary,Remittance Advice Download.- Offense progression rules in
Offenses.csvandEmployee App.csv(warning -> suspension -> disable/block).
4) Stakeholder capability matrix (from roadmap exports)
| Stakeholder lane | Org network | Orders and shifts | Attendance and offense | Compliance docs | Finance | Reporting |
|---|---|---|---|---|---|---|
| Client (Google, Nvidia) | Yes | Yes | Partial (visibility) | Yes | Yes | Yes |
| Vendor (Legendary) | Yes | Yes | Yes | Yes | Yes | Yes |
| Workforce (Employee app) | Limited | Yes | Yes | Yes | Earnings focus | Limited |
| Operator (Compass) | Yes | Yes | KPI visibility | Yes | Yes | Yes |
| Procurement (FoodBuy) | Yes | KPI/SLA focus | KPI/SLA focus | Yes | Yes | Yes |
| KROW Dashboard | Cross-entity | Cross-entity | Cross-entity risk | Cross-entity | Cross-entity | Heavy |
| Partner | Basic | Basic | Minimal | Yes | Basic | Basic |
Implication:
- This is a multi-tenant, multi-party workflow platform, not a single-role CRUD app.
- Schema must separate party identity, party relationships, and role-based permissions from workflow records.
5) Reconciliation against current Data Connect schema
What already exists and is useful:
- Core scheduling entities:
orders,shifts,shift_roles,applications,assignments. - Workforce entities:
staffs,workforce,staff_roles. - Financial entities:
invoices,recent_payments,vendor_rates. - Compliance entities:
documents,staff_documents,certificates.
Current structural gaps for roadmap scale:
- No tenant boundary key on core tables (
tenant_idmissing). - No first-class business user partitioning table (
business_membershipsmissing). - No first-class vendor user partitioning table (
vendor_membershipsmissing). - No first-class stakeholder profile/link model for buyer/operator/partner/sector relationships.
- Attendance history is not first-class (check in/out only inside
applications). - No offense policy, offense event, or enforcement action tables.
- Finance is coarse (invoice + recent payment), missing line items, payment runs, remittance artifact model.
- Sensitive bank fields are currently modeled directly in
accounts(accountNumber,routeNumber). - Many core workflow fields are JSON (
orders.assignedStaff,orders.shifts,shift.managers,assignment.managers). - Money still uses float in critical tables.
Connector boundary gap:
- 147 Data Connect mutation operations exist.
- 36 of those are high-risk core workflow mutations (
order,shift,shiftRole,application,assignment,invoice,vendor,business,workForce,teamMember,account).
6) Target schema additions required before full command rollout
6.1 Tenant and stakeholder graph
tenantstenant_membershipsbusiness_membershipsvendor_membershipsstakeholder_typesstakeholder_profilesstakeholder_linksrole_bindings(scoped to tenant/team/hub/business/vendor/resource)
6.2 Attendance and timesheet reliability
attendance_events(append-only clock-in/out/NFC/manual-corrected)attendance_sessions(derived per shift role assignment)timesheets(approval state and pay-eligible snapshot)timesheet_adjustments(manual corrections with audit reason)
6.3 Offense and policy enforcement
offense_policies(per tenant or per business)offense_rules(threshold and consequence ladder)offense_events(who, what, when, evidence)enforcement_actions(warning, suspension, disable, block-from-client)
6.4 Compliance and verification
verification_jobsverification_reviewsverification_eventscompliance_requirements(per role, tenant, business, or client contract)
6.5 Finance completeness
invoice_line_itemsinvoice_status_historypayment_runspayment_allocationsremittance_documentsaccount_token_refs(tokenized provider refs, no raw account/routing)
7) Minimal target relationship view
erDiagram
TENANT ||--o{ TENANT_MEMBERSHIP : has
BUSINESS ||--o{ BUSINESS_MEMBERSHIP : has
VENDOR ||--o{ VENDOR_MEMBERSHIP : has
USER ||--o{ BUSINESS_MEMBERSHIP : belongs_to
USER ||--o{ VENDOR_MEMBERSHIP : belongs_to
TENANT ||--o{ STAKEHOLDER_PROFILE : has
STAKEHOLDER_PROFILE ||--o{ STAKEHOLDER_LINK : links_to
TENANT ||--o{ BUSINESS : owns
TENANT ||--o{ VENDOR : owns
BUSINESS ||--o{ ORDER : requests
VENDOR ||--o{ ORDER : fulfills
ORDER ||--o{ SHIFT : expands_to
SHIFT ||--o{ SHIFT_ROLE : requires
SHIFT_ROLE ||--o{ APPLICATION : receives
APPLICATION ||--o{ ASSIGNMENT : becomes
ASSIGNMENT ||--o{ ATTENDANCE_EVENT : emits
ASSIGNMENT ||--o{ TIMESHEET : settles
OFFENSE_POLICY ||--o{ OFFENSE_RULE : defines
ASSIGNMENT ||--o{ OFFENSE_EVENT : may_trigger
OFFENSE_EVENT ||--o{ ENFORCEMENT_ACTION : causes
ORDER ||--o{ INVOICE : bills
INVOICE ||--o{ INVOICE_LINE_ITEM : contains
PAYMENT_RUN ||--o{ PAYMENT_ALLOCATION : allocates
INVOICE ||--o{ PAYMENT_ALLOCATION : receives
PAYMENT_RUN ||--o{ REMITTANCE_DOCUMENT : publishes
8) First-principles rules we should lock now
- Every command-critical table includes
tenant_id. - High-risk writes go through command APIs only.
- Money uses exact numeric type (or integer cents), never float.
- Core workflow state is relational and constrained, not JSON blobs.
- Every irreversible state change has append-only audit event rows.
9) Decision
This roadmap evidence supports continuing with the target architecture direction (command boundary + multi-tenant schema), but we should add attendance/offense/settlement/stakeholder-graph tables before full command rollout on mission-critical flows.