Skeleton setup

What needs wiring next.

This is the product boundary layer: standalone business profile, trade pack, API contracts, approval policy and data separation from GPE.

Business profile

NameTrade Office OS Demo
Trade packplumbing-heating-gas-renewables
Approval policyapproval_gated_external_sends
Data sourcedemo · read-only scaffold
Adapter healthhealthy · writes disabled · sends disabled
RollbackUnset TRADE_OFFICE_OS_ENABLE_SQLITE_READONLY and restart preview to return to synthetic demo data.
Release notesPromotion record required before staging/production deploys
Incident support runbooksev0_stop means freeze, preserve evidence and notify Alex before repair
Data boundaryStandalone demo data. No GPE branding or customer data.

Finishing the skeleton

  1. Extract real CRM domain service from existing scripts.
  2. Implement read-only dashboard API first.
  3. Wire intake review actions to approval-gated mutations.
  4. Add auth/roles before any live customer data.
  5. Package mobile as PWA; desktop as PWA first, Tauri later.
  6. Record release notes before any staging/production promotion.

Failure taxonomy

Internal pilot recovery contract: quarantine or read-only mode first; no hidden live data and no app-side external sends. Freeze, classify, contain, then run the full gate before a support fix is complete.

ClassSignalOperator response
intake_low_confidenceMissing identity, address, intent, or conflicting service termsKeep in review and ask for human clarification before structured writes
duplicate_or_conflictCandidate overlaps an existing customer, quote, follow-up, or document with conflicting factsShow both records and require owner/admin decision; never auto-merge
unsafe_outboundDraft has unapproved send path, pressure language, opt-out conflict, or risky claimsQuarantine the draft; keep external send disabled and manual-copy only
adapter_unavailableAdapter, schema, import/export, or database boundary cannot be trustedFall back to read-only/degraded mode; never swap in hidden live data
audit_gapA command is missing actor, idempotency key, source evidence, or timestampRefuse mutation and preserve the raw source item for repair
privacy_boundaryReal customer identifiers appear in demo fixtures, docs, screenshots, or seed dataStop, remove the data, and re-run privacy/static gates before commit

API contracts

RoutePurpose
GET /api/dashboard.jsonToday summary, KPIs, due work, missed-opportunity rollup
GET /api/intake.jsonReview queue with route confidence, evidence, suggested next action
GET /api/follow-ups.jsonQuote chase, callback and review request queues
GET /api/outbound-queue.jsonManual-send draft queue with risk flags
GET /api/weekly-summary.jsonWeekly recovery summary and safety notes
GET /api/customers.jsonCustomer hub summaries and timelines
GET /api/audit.jsonAudit trail items with safety notes
GET /api/business-profile.jsonStandalone tenant config, trade terms, branding and policies
UI /operator-manualPilot onboarding, role boundaries and stop rules before sensitive work