# WRIO Platform & BizCom: Full Specification WRIO is a decentralized, data-driven ecosystem for business automation, digital sovereignty, and agent-native applications. --- ## 1. BizCom (Business Communication & Execution Engine) BizCom is the central engine of the WRIO platform. It acts as an execution environment where all business data—including processes, deals, contacts, forms, audit logs, and integration connectors—is aggregated and run. ### Core Philosophy (Wolfram-Inspired) BizCom is designed using key concepts inspired by Stephen Wolfram's "A New Kind of Science": - **Simple Rules, Emergent Complexity**: Business processes are defined by simple parameter-driven rules (stored in R2 config files like `store/settings.json`) rather than complex hardcoded software paths. - **Event Sourcing (Computational Irreducibility)**: Instead of just mutable database tables, the system maintains an immutable event log as the single source of truth. The state of any entity is reconstructed by replaying this log. - **Agent-Based Model**: Contacts, deals, and projects operate as independent state machine agents that react to system events according to defined rules. - **Unified Representation**: Every entity is treated as a uniform structure: `Entity { type, state, score, attrs, history }`. ### Key Capabilities - **Business Pulse Playbook**: Generates automated, role-based weekly/monthly briefs (e.g., Monday Brief, Friday Brief, Quarterly Review) using AI to analyze active workflows, CRM pipelines, and external integrations (Stripe, HubSpot, etc.). - **Durable Workflows**: Multi-step business processes are orchestrated via Cloudflare Durable Objects. - **Universal SDK**: Embeddable forms and widgets using strict Shadow DOM isolation to ensure no styling conflicts with third-party sites. --- ## 2. Platform Products built on WRIO While BizCom is the core engine, the platform hosts several tailored products: ### Workflows API The runtime engine that executes `.jsonld` process definitions in a highly parallel, serverless environment. It uses Service Bindings (`env.STORAGE_SERVICE`) to talk to database layers in a Zero-Trust topology. ### Sentry (Email Privacy & Sovereignty) A security-focused service providing anonymous email aliases, protecting business and personal emails from trackers and spam. Integrates with the platform's storage logic to store emails in user-scoped R2 storage. ### Sonar (Outreach CRM) A specialized sales development tool for tracking contacts, prospecting on LinkedIn, managing outreach campaigns, and automating follow-up pings. ### Autoparts (SMB Auto Wrecking) A niche vertical automation tool for auto parts sellers/wreckers. It automates inventory listing, customer lead capture, and immediate response automation (e.g., replying with matching part availability within 30 seconds of a request). --- ## 3. Technical & Architectural Rules AI Agents and developers working with the WRIO monorepo must adhere to the following principles: - **Zero-Trust Storage Access**: Applications never access databases (D1) directly; they communicate via the DB Gateway (`/api/v1/db/query`) with service tokens and caller ACL verification. - **Shadow DOM Isolation**: All embedded widgets and frontend forms must use Shadow DOM. Styling overrides like `!important` are prohibited. - **Functional Core, Imperative Shell**: Code is split into pure calculations (`.logic.ts` - no I/O) and imperatively orchestrated services (`.service.ts` - I/O, DB, fetch). - **Snake Case for Data Properties**: All database columns, API DTOs, and JSON fields must use `snake_case`.