Architectural Patterns & Playbooks¶
This document outlines how Alpha Pebble engineering playbooks are applied to the Pebble Business Orchestrator to solve data fragmentation, context loss, and process opacity.
1. Enterprise Context Layer¶
Problem: "The Heterogeneity Problem." Sales data lives in emails, financial data in ERP (Focus RT/BC), and relationship data in CRM (D365). No single system sees the whole picture.
Pebble Solution:
We treat the Kanban Card not just as a task, but as a Universal Context Container.
- Signals: It stitches together the Email (unstructured signal), the ERP Order Status (transactional signal), and the CRM Lead Score (relational signal).
- Implementation: The ProcessInboxUseCase orchestrator aggregates these disparate IDs (MessageID, LeadID, OrderID) into a single KanbanCard entity.
- Value: When a user looks at the board, they see the whole customer context, effectively breaking down the silos between Sales, Logistics, and Finance.
2. Precedent Engineering¶
Problem: "Dark Context." Why did we give a 5% discount? Why did we pick Supplier B over Supplier A? This reasoning is buried in email threads or Slack chats and lost to the ERP.
Pebble Solution: We use AI (Ralph/Ollama) to extract "Decision Traces" from unstructured communications. - Tracing: When an email says "Approved discount due to bulk volume," the AI extracts this reason and appends it to the Kanban Card's metadata as a structured "Decision Note." - Audit Trail: This turns ephemeral approvals into permanent audit records. - Value: Future price searches ("Why did we quote X last time?") return not just the price, but the reasoning (Precedent) behind it.
3. Activity-Stream Engineering¶
Problem: Static Database Records. A CRM "Status" is a snapshot in time. It doesn't tell the story of how we got there or allow for different teams to view the same data differently.
Pebble Solution:
We treat business events as an Immutable Activity Stream.
- Events: EmailReceived, LeadClassified, QuoteRequested, OrderDispatched.
- Perspective Engines:
- Sales Lens: Views the stream as a Funnel (New -> Won).
- Logistics Lens: Views the same stream as a Dispatch Schedule (Ordered -> Shipped).
- Compliance Lens: Views it as a Risk Alert stream (New Customer -> KYC Verified).
- Implementation: The underlying event log (stored in Plane/Database) is the source of truth; the Kanban Board is just one perspective on that stream.