{"slug":"business/AGENTS_SUPPLEMENT","title":"IntegrateWise - Universal Cognitive Operating System","section":"business","sectionLabel":"Business","status":"unclassified","type":"document","path":"business/AGENTS_SUPPLEMENT.mdx","bytes":31907,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n## Agent Context Document\n\n> **Version**: 1.0  \n> **Last Updated**: February 2026  \n> **Classification**: Confidential\n\n---\n\n## 1. Executive Summary\n\nIntegrateWise is a **Universal Cognitive Operating System** — an AI-powered Knowledge Workspace that fundamentally changes how organizations work with their tools, data, and AI.\n\n**Core Philosophy**: _\"AI That Thinks in Context, Waits for Approvals\"_\n\n**Tagline**: _Normalize Once, Render Anywhere | Enhance, Don't Replace_\n\n**The Differentiator**: First application since 1945 to complete the full loop of **human approval and post-approval agent execution with audit rails and evidence backing**.\n\n---\n\n## 2. The Core Loop\n\n```\nLOAD → NORMALIZE → STORE → THINK → REVIEW & APPROVE → ACT → REPEAT\n```\n\nThe **REVIEW & APPROVE** (Govern) stage is a **hard gate**. Nothing executes without:\n\n- Human approval\n- Audit trail\n- Evidence backing\n\nThis is what makes IntegrateWise fundamentally different from every AI-native tool on the market.\n\n---\n\n## 3. Four-Layer Architecture (L0–L3)\n\n| Layer  | Name                      | Purpose                                                               | Key Components                                                                                                                           |\n| ------ | ------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |\n| **L0** | Onboarding                | Signup, context questions, tool connect, first data hydration         | 4 stages: Entry + AI Insights → AI Loader Demo → Context Selection → Tool Connect + First Hydration                                      |\n| **L1** | Context-Aware Workspace   | 15 modules rendering context-specific views of normalized data        | Home, Projects, Accounts, Contacts, Meetings, Docs, Tasks, Calendar, Notes, Knowledge Space, Team, Pipeline, Risks, Expansion, Analytics |\n| **L2** | Universal Cognitive Layer | 14 cognitive components for reasoning, action, and governance         | SpineUI, ContextUI, KnowledgeUI, Evidence, Signals, Think, Act, HITL, Govern, Adjust, Repeat, AuditUI, AgentConfig, DigitalTwin          |\n| **L3** | Universal Backend         | The engine: 8-stage mandatory pipeline, 4 accelerators, 6 data stores | Pipeline stages, accelerators, stores, engines, dual-loop architecture, security model                                                   |\n\n**Critical Rule**: Every piece of data must flow through L3 before reaching L1 or L2. There are no shortcuts.\n\n---\n\n## 4. L0: Onboarding Flow\n\n| Stage                                 | What Happens                                                                                                                                                                                         | Duration   |\n| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |\n| **1. Entry + AI Insights**            | Name + DOB input. AI personality analysis generates working style predictions, strengths, and growth areas. First \"wow moment\".                                                                      | 0–15 sec   |\n| **2. AI Loader Demo**                 | Natural language input demo. AI transforms unstructured input into structured actions across 4 tools simultaneously. Second \"wow moment\".                                                            | 15–30 sec  |\n| **3. Context Selection**              | Two workspace paths: Productivity Hub (OS) for ICs/PMs/Team Leads, or CS Platform for CSMs/AMs/CS Leaders. Same user can switch anytime. Signup (Google OAuth / email) happens here.                 | 30–50 sec  |\n| **4. Tool Connect + First Hydration** | Connect 1–2 tools via OAuth or upload a data dump (CSV/JSON/PDF). Backfill sync runs paginated historical import through the full 8-stage pipeline. Onboarding Accelerator bootstraps the workspace. | 50–120 sec |\n\n---\n\n## 5. L1: Context-Aware Workspace (15 Modules)\n\nThe L1 workspace consists of 15 modules, each providing a context-aware projection of normalized data from the Spine.\n\n| Module              | Purpose                                                                | Key Data Sources                 |\n| ------------------- | ---------------------------------------------------------------------- | -------------------------------- |\n| **Home**            | Personalized dashboard with signals, pending actions, and key metrics  | All stores → aggregated view     |\n| **Projects**        | Cross-tool project tracking with tasks, milestones, and ownership      | Tasks, Accounts, Contacts        |\n| **Accounts**        | Unified account view with health scores, risk signals, and engagement  | Spine SSOT + Accelerators        |\n| **Contacts**        | Normalized contact directory with engagement history and relationships | Spine + Context Store            |\n| **Meetings**        | Calendar integration with AI-generated agendas and action items        | Calendar tools + Think Engine    |\n| **Docs**            | Document hub with unstructured content indexed and searchable          | Context Store (embeddings)       |\n| **Tasks**           | Cross-tool task aggregation with priority scoring and due dates        | Spine + multiple tool sources    |\n| **Calendar**        | Unified calendar view across all connected tools                       | Calendar tool connectors         |\n| **Notes**           | AI-assisted note-taking with auto-linking to entities                  | Context Store + Spine links      |\n| **Knowledge Space** | Organizational knowledge base built from docs, chats, and interactions | Context Store + AI Chats Store   |\n| **Team**            | Team performance, workload distribution, and collaboration metrics     | Spine + Activity logs            |\n| **Pipeline**        | Deal and opportunity tracking with velocity metrics                    | CRM connectors + Accelerators    |\n| **Risks**           | Proactive risk detection with evidence-backed alerts                   | Think Engine + Signals component |\n| **Expansion**       | Upsell and growth opportunity identification                           | Accelerators + Spine analytics   |\n| **Analytics**       | Cross-module analytics with growth-aligned reporting                   | All stores + Domain Accelerators |\n\n---\n\n## 6. L2: Universal Cognitive Layer (14 Components)\n\nThe L2 cognitive layer is the reasoning and governance engine. Its 14 components are universal — they operate across all workspace contexts.\n\n| Component       | Type           | Purpose                                                                            |\n| --------------- | -------------- | ---------------------------------------------------------------------------------- |\n| **SpineUI**     | Data Surface   | Canonical data browser — view and navigate normalized SSOT records                 |\n| **ContextUI**   | Data Surface   | Unstructured context viewer — documents, embeddings, related content               |\n| **KnowledgeUI** | Data Surface   | Knowledge graph explorer — organizational knowledge from all three planes          |\n| **Evidence**    | Intelligence   | Evidence compiler — assembles proof backing every signal and recommendation        |\n| **Signals**     | Intelligence   | Signal detector — identifies patterns, anomalies, and changes across data          |\n| **Think**       | Reasoning      | Situation assessor — evaluates signals against goals and produces proposed actions |\n| **Act**         | Execution      | Action executor — carries out approved actions with tool write-back                |\n| **HITL**        | Governance     | Human-in-the-loop approval gate — the hard stop before any AI action executes      |\n| **Govern**      | Governance     | Policy and compliance enforcement — ensures actions meet organizational rules      |\n| **Adjust**      | Learning       | Feedback loop — captures approval/rejection patterns to improve future proposals   |\n| **Repeat**      | Learning       | Continuous cycle driver — re-evaluates situations after actions complete           |\n| **AuditUI**     | Compliance     | Audit trail viewer — immutable log of all actions, approvals, and data changes     |\n| **AgentConfig** | Administration | Agent configuration — define, enable, tune, and monitor AI agents                  |\n| **DigitalTwin** | Simulation     | Workspace simulation — test proposed changes before committing to production       |\n\n---\n\n## 7. L3: Universal Backend Engine\n\n### 7.1 Three Data Ingestion Planes\n\n| Plane                                 | Data Type                                                    | Ingestion Path                                                    | Storage                       |\n| ------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------- | ----------------------------- |\n| **Plane 1: Structured (Tool Data)**   | CRM deals, support tickets, billing events, calendar entries | Webhooks/Polling → Connector Service → 8-Stage Pipeline           | Spine (Neon PostgreSQL)       |\n| **Plane 2: Unstructured (Documents)** | PDFs, CSVs, spreadsheets, emails, images                     | Upload/Watch → R2 raw storage → Knowledge Service → Chunk + Embed | Context Store (pgvector + R2) |\n| **Plane 3: AI Chats (MCP Sessions)**  | Conversations from Claude, ChatGPT, other AI providers       | MCP Connectors → Session Summarization → Compress at Source       | AI Chats Store                |\n\n### 7.2 Eight-Stage Mandatory Pipeline\n\nEvery piece of data — regardless of source, type, or urgency — must pass through all 8 stages. There are no shortcuts.\n\n| Stage | Name            | Processing                                                                                                                                                             | Failure Mode                                   |\n| ----- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |\n| 1     | **Analyzer**    | Source detection, object type identification, metadata extraction, schema version check. Stamps payload with pipeline_id for traceability.                             | Unknown source or malformed payload → DLQ      |\n| 2     | **Classifier**  | Category mapping to internal taxonomy, CTX enum assignment, priority scoring (critical/normal/batch), accelerator routing flags.                                       | Unmappable object type → DLQ                   |\n| 3     | **Filter**      | Tenant-level and user-level data scope enforcement. Checks data against scope definitions set during L0 onboarding. PII detection flags.                               | Scope rule error → pass-through with warning   |\n| 4     | **Refiner**     | Field-level transformations: date normalization (ISO 8601 UTC), currency conversion, text cleaning (HTML strip), entity resolution across tools.                       | Schema mapping failure → DLQ                   |\n| 5     | **Extractor**   | Relationship extraction (account→contacts, deal→line items), computed fields (deal velocity, sentiment), change delta calculation, embedding generation for documents. | Extraction failure → DLQ with partial results  |\n| 6     | **Validator**   | Data integrity checks, deduplication (exact + fuzzy), business rule validation, cross-reference verification against existing Spine records.                           | Integrity violation → DLQ                      |\n| 7     | **Sanity Scan** | AI-powered anomaly detection, outlier identification, test data detection. Uses rules + ML to quarantine suspicious data before it enters stores.                      | Anomaly detected → Quarantine for human review |\n| 8     | **Sectorizer**  | Final routing to appropriate stores (Spine, Context, AI Chats). Performs the dual-write. Emits events to Think Engine and triggers Accelerator recalculation.          | Write failure → retry queue with backoff       |\n\n### 7.3 Four Accelerator Systems\n\n| Accelerator                   | Purpose                                                                                                                                 | Key Components                                                                                                        |\n| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| **Extraction Accelerator**    | Preserve tool-native structure during ingestion. Captures formulas, automations, and relationships that would be lost in normalization. | Ingress Controller, Tool Puller, Object Graph Builder, Formula Capture, Automation Capture, External ID Resolver      |\n| **Normalization Accelerator** | Map extracted data to the SSOT canonical schema. Handles schema detection, field transformation, and relationship preservation.         | Schema Detector, Schema Registry, Category Mapper, Field Transformer, Relationship Preserver, SSOT Builder            |\n| **Onboarding Accelerator**    | L0-specific compute. Analyzes initial data to bootstrap the workspace with presets, templates, and scope definitions.                   | Context Analyzer, Preset/Template Selector, Data Scope Definition                                                     |\n| **Domain Accelerators (×6)**  | Post-normalization domain-specific intelligence. Each produces scored, goal-linked metrics.                                             | Customer Health Score, Churn Prediction, Revenue Forecaster, Pipeline Velocity, Support Health, Marketing Attribution |\n\n### 7.4 Six Data Stores\n\n| Store                       | Technology                 | Purpose                                                                                      | Access Pattern                                     |\n| --------------------------- | -------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------- |\n| **Spine (SSOT)**            | Neon PostgreSQL            | Canonical normalized records. The single source of truth for all structured data.            | Read/write via Pipeline + Act Engine               |\n| **Context Store**           | pgvector on Neon + R2      | Embeddings, document chunks, and metadata for unstructured content. Enables semantic search. | Write via Pipeline; read via Knowledge components  |\n| **AI Chats Store**          | Neon PostgreSQL            | Summarized AI chat sessions. Never stores full transcripts — only compressed summaries.      | Write via MCP Connectors; read via KnowledgeUI     |\n| **Audit Store**             | Neon (append-only)         | Immutable log of every action, approval, data change, and system event.                      | Write-only from all services; read via AuditUI     |\n| **Hot Memory**              | Cloudflare Durable Objects | Real-time state for active sessions, collaboration, and in-flight computations.              | Read/write by Workers; auto-evicts to cold storage |\n| **Dead Letter Queue (DLQ)** | Cloudflare Queue + Neon    | Failed pipeline items with full context for debugging and replay.                            | Write from any pipeline stage; read by ops tooling |\n\n---\n\n## 8. AI Agent System\n\n**Only One Cognitive Twin**\n\nThe system operates with a single Cognitive Twin per tenant/workspace, not multiple specialized agents. This twin:\n\n- Maintains continuity across all interactions\n- Learns from all approved/rejected actions\n- Operates across all three data planes\n- Enforces governance policies uniformly\n\n**Key Principles**:\n\n- Approval-only execution: Every agent proposal passes through the HITL gate\n- The Think Engine generates situations and proposed actions\n- The Govern layer enforces policy compliance\n- The HITL component presents proposals to the human approver\n- Only after explicit approval does the Act Engine execute\n- The Adjust component captures the approval or rejection to improve future proposals\n\n---\n\n## 9. Dual-Loop Architecture\n\nIntegrateWise operates two reinforcing feedback loops that converge to create a self-improving system.\n\n### 9.1 Loop A: Context-to-Truth (Human-Governed)\n\n```\nContext → Brainstorming → Action → Tool Write → Ingest → Normalize → Truth → View → Repeat\n```\n\nCaptures human intelligence from governed channels (Slack, WhatsApp, Telegram, Custom GPTs) and converts it into executable actions.\n\n**Critical Rule**: Brainstorming NEVER becomes truth directly. Truth is only created when an action writes to a tool, and the ingestion pipeline confirms and normalizes it.\n\n### 9.2 Loop B: Tool-to-Truth (System-Governed)\n\n```\nLoader → 8-Stage Pipeline → Store (Spine) → Think Engine → Act Engine → Tool Write-Back → Repeat\n```\n\nProcesses structured tool data through the continuous intelligence cycle.\n\n### 9.3 Convergence\n\n- Loop A feeds Loop B through tools: human decisions result in tool updates, which Loop B ingests and normalizes\n- Loop A triggers change; Loop B confirms truth\n- Both converge into the Think Engine's views\n- Both repeat continuously\n- The convergence point is the **Spine**, where all validated truth resides regardless of origin\n\n---\n\n## 10. Infrastructure Stack\n\n| Layer                   | Service                    | Purpose                                                                                                          |\n| ----------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| **Compute**             | Cloudflare Workers         | API Gateway, pipeline stages, connector logic, engine services. Workers Paid plan; 50ms CPU limit; auto-scaling. |\n| **Queue**               | Cloudflare Queues          | Pipeline stage-to-stage messaging, DLQ, event bus. Dedicated queues per stage; batch size 10; max retries 3.     |\n| **Database**            | Neon PostgreSQL            | Spine (SSOT), Context Store, AI Chats Store, Audit Store. Serverless compute; auto-suspend; PITR enabled.        |\n| **Vector Search**       | pgvector on Neon           | Embedding storage and similarity search for Context Store. HNSW index; cosine distance.                          |\n| **Object Storage**      | Cloudflare R2              | Raw files, document blobs, archived sessions, evidence attachments. S3-compatible; no egress fees.               |\n| **Cache**               | Upstash Redis              | Rate limiting, session tokens, temporary computation results. Serverless; per-request pricing.                   |\n| **Durable State**       | Cloudflare Durable Objects | Hot Memory, real-time collaboration state, connection sessions. Per-object isolation; transactional.             |\n| **Cron / Scheduling**   | Cloudflare Cron Triggers   | Scheduled sync polling, accelerator recalculation, cleanup jobs. Minute-level granularity.                       |\n| **DNS / CDN**           | Cloudflare                 | Domain routing, SSL termination, DDoS protection, edge caching. Full proxy mode; WAF rules.                      |\n| **AI Inference**        | OpenRouter                 | AI calls for Sanity Scan, Think Engine, session summarization. Multi-model routing; fallback chains.             |\n| **Auth**                | Supabase Auth              | User authentication, JWT issuance, social login, MFA. RLS integration with Neon PostgreSQL.                      |\n| **Secrets Management**  | Doppler                    | Centralized secrets management across all environments. Injects env vars at runtime; no .env files.              |\n| **Workflow Automation** | n8n (self-hosted)          | Internal operational workflows, email triage, notification routing. Hosted at n8n.integratewise.online.          |\n| **Frontend Hosting**    | Cloudflare Pages           | Static site hosting for Vite React app. Automatic deployments from main branch.                                  |\n\n---\n\n## 11. Security Model\n\nSecurity is enforced at every layer, from network edge to database row. Zero-trust principles: every request is authenticated, every query is scoped, every action is audited.\n\n| Layer                  | Mechanism                           | Implementation                                                                             |\n| ---------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ |\n| **Network Edge**       | DDoS protection, WAF, rate limiting | Cloudflare proxy with WAF rules; per-IP and per-tenant rate limits                         |\n| **Transport**          | TLS 1.3 everywhere                  | Cloudflare SSL termination; encrypted connections to Neon and R2                           |\n| **Authentication**     | JWT + HMAC + OAuth                  | Supabase Auth for users; HMAC for service-to-service; OAuth for tool connections           |\n| **Authorization**      | RBAC + RLS                          | Role-based access control at API layer; Row-Level Security at database layer               |\n| **Data Isolation**     | Tenant isolation via RLS            | Every database query automatically scoped to tenant_id via PostgreSQL RLS policies         |\n| **Encryption at Rest** | AES-256                             | Neon PostgreSQL encryption; R2 server-side encryption                                      |\n| **Secret Management**  | Doppler                             | Centralized secrets vault; environment-specific configs; automatic rotation; audit logging |\n| **Audit**              | Immutable audit log                 | Every data access, modification, and action logged to append-only Audit Store              |\n| **PII Handling**       | Field-level detection               | Pipeline Filter stage flags PII fields; configurable masking and retention policies        |\n| **Compliance**         | GDPR, DPDP Act 2023                 | Right to access, erasure, portability. Cascade delete with audit trail.                    |\n\n### 11.1 Data Commitments\n\n- **No data selling** — data is never sold, rented, or shared with third parties\n- **No AI training** — customer data is never used to train AI models\n- **Full portability** — export all data at any time\n- **Complete deletion** — request deletion and everything is removed, with audit confirmation\n- **Transparent processing** — data is only processed as the customer directs\n\n---\n\n## 12. Queue and Event Architecture\n\n| Queue Name              | Producer                        | Consumer             | Purpose                            |\n| ----------------------- | ------------------------------- | -------------------- | ---------------------------------- |\n| **connector.inbound**   | Webhook handlers / Cron pollers | Stage 1: Analyzer    | Raw payloads from connectors       |\n| **pipeline.analyzed**   | Stage 1: Analyzer               | Stage 2: Classifier  | Annotated payloads                 |\n| **pipeline.classified** | Stage 2: Classifier             | Stage 3: Filter      | Classified payloads                |\n| **pipeline.filtered**   | Stage 3: Filter                 | Stage 4: Refiner     | Scope-approved payloads            |\n| **pipeline.refined**    | Stage 4: Refiner                | Stage 5: Extractor   | Normalized payloads                |\n| **pipeline.extracted**  | Stage 5: Extractor              | Stage 6: Validator   | Enriched payloads                  |\n| **pipeline.validated**  | Stage 6: Validator              | Stage 7: Sanity Scan | Validated payloads                 |\n| **pipeline.scanned**    | Stage 7: Sanity Scan            | Stage 8: Sectorizer  | Quality-approved payloads          |\n| **pipeline.dlq**        | Any stage on failure            | DLQ Manager          | Failed/quarantined items           |\n| **engine.think**        | Sectorizer (post-write)         | Think Engine         | Data change events for reasoning   |\n| **engine.act**          | HITL approval                   | Act Engine           | Approved actions for execution     |\n| **accelerator.trigger** | Sectorizer (post-write)         | Accelerator Router   | Accelerator recalculation triggers |\n| **context.events**      | Slack / WhatsApp / Telegram     | Context Processor    | Governed channel messages          |\n| **mcp.sessions**        | MCP Connectors                  | Session Processor    | AI chat session captures           |\n\n---\n\n## 13. Growth-Aligned Data Model\n\nIntegrateWise does not just track data — it tracks growth. Every record, metric, and signal is linked to organizational goals.\n\n| Dimension      | Traditional Systems                                   | IntegrateWise                                                                          |\n| -------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------- |\n| **Data Model** | Static records: \"We have 100 accounts with $850k ARR\" | Active, goal-linked: \"100 accounts at 85% of $1M goal, $150k gap, Acme at MEDIUM RISK\" |\n| **View**       | Reactive — \"What happened?\"                           | Proactive, risk-aware — \"What should I do to hit my goals?\"                            |\n| **Action**     | Manual — human interprets and decides                 | Suggested, evidence-based — AI proposes, human approves                                |\n| **Learning**   | None — same static view regardless of outcomes        | Continuous — every approval/rejection improves future proposals                        |\n| **Alignment**  | Data disconnected from goals                          | Every metric is a percentage of a goal, with risk scoring and gap analysis             |\n\n---\n\n## 14. Unique Architectural Combination\n\nIntegrateWise combines eight architectural elements that no single competitor has brought together:\n\n| Element                         | Exists Elsewhere?     | IntegrateWise                               |\n| ------------------------------- | --------------------- | ------------------------------------------- |\n| L0–L3 Cognitive Architecture    | No                    | ✓ Full 4-layer cognitive system             |\n| MCP-Native (AI Tool Discovery)  | Anthropic only        | ✓ Integrated for AI session capture         |\n| Dual-Write (Truth + Context)    | No                    | ✓ Spine + Context Store parallel writes     |\n| Preserved Work Layer            | Traditional apps only | ✓ Enhance, don't replace existing workflows |\n| Approval-Only Agents            | No                    | ✓ Hard HITL gate before every action        |\n| Edge Correction (Self-Learning) | Research papers only  | ✓ Adjust + Repeat components in production  |\n| Growth-Aligned Schema           | BI tools (static)     | ✓ Active, goal-linked at database level     |\n| Continuous Learning Loop        | No                    | ✓ Dual-loop with convergence at Spine       |\n\n**No competitor has more than 2–3 of these elements. IntegrateWise has all eight, working together.**\n\n---\n\n## 15. Development Guidelines\n\n### 15.1 Code Organization\n\n```\npackages/\n├── api/                    # L3 API services (Cloudflare Workers)\n├── connectors/            # Tool integrations (Salesforce, HubSpot, etc.)\n├── mcp-connector/         # MCP protocol implementation\n├── web/                   # L1 Workspace (Next.js)\n├── cognitive/             # L2 components (React)\n├── types/                 # Shared TypeScript definitions\n├── config/                # Environment and configuration\n└── lib/                   # Shared utilities\n\nservices/\n├── loader/                # 8-stage pipeline implementation\n├── normalizer/            # Schema transformation (NA0-NA5)\n├── spine/                 # SSOT data service\n├── context/               # Unstructured data service\n├── think/                 # Reasoning engine\n├── act/                   # Execution engine\n├── govern/                # Policy enforcement\n├── audit/                 # Audit logging service\n├── accelerators/          # Domain intelligence engines\n├── iq-hub/                # AI conversation management\n├── knowledge/             # Vector search and embeddings\n└── gateway/               # API gateway and routing\n```\n\n### 15.2 Key Principles for Agents\n\n1. **No shortcuts through the pipeline** — All data must flow through all 8 stages\n2. **HITL is mandatory** — No AI action executes without human approval\n3. **Dual-write to Spine + Context** — Every normalized record writes to both stores\n4. **Evidence for every claim** — All signals and recommendations must have provenance\n5. **Tenant isolation is absolute** — Every query must include tenant_id scoping\n6. **Audit everything** — Every action, approval, and data change is logged\n7. **Normalize once, render anywhere** — Canonical schemas are the source of truth\n8. **Growth-aligned by default** — All metrics link to goals\n\n### 15.3 Testing Requirements\n\n- Unit tests for all pipeline stages\n- Integration tests for connector OAuth flows\n- End-to-end tests for approval workflows\n- Load tests for pipeline throughput (target: 10k events/minute)\n- Security tests for RLS policies\n- Chaos tests for DLQ recovery\n\n### 15.4 Secrets Management (Doppler)\n\n**NO LOCAL .ENV FILES.** All secrets are managed through Doppler.\n\n**Required Doppler Secrets:**\n\n```\nVITE_SUPABASE_URL          # Supabase project URL\nVITE_SUPABASE_ANON_KEY     # Supabase anonymous key\nSUPABASE_SERVICE_KEY       # Service role key (backend only)\nOPENROUTER_API_KEY         # AI inference API key\nN8N_WEBHOOK_SECRET         # n8n workflow auth\n```\n\n**Development Workflow:**\n\n```bash\n# Login to Doppler\ndoppler login\n\n# Setup project\ndoppler setup\n\n# Run dev server with Doppler\ndoppler run -- npm run dev\n\n# Build with Doppler\ndoppler run -- npm run build\n```\n\n**Environment Structure:**\n\n- `dev` — Local development\n- `staging` — Pre-production testing\n- `prod` — Production environment\n\n**Security Rules:**\n\n1. Never commit secrets to git\n2. Never share service keys in Slack/email\n3. Rotate keys quarterly via Doppler\n4. Use separate projects for dev/staging/prod\n\n---\n\n## 16. Contact & Resources\n\n- **Company**: IntegrateWise LLP\n- **Founded**: 2025\n- **Location**: Bengaluru, India\n- **Founder**: Nirmal Prince J\n\n**Key Documents**:\n\n- `docs/ARCHITECTURE_OVERVIEW.md` — High-level system design\n- `docs/CANONICAL_ARCH_SPEC.md` — L0-L3 canonical model\n- `docs/DATABASE_SCHEMA.md` — Data store specifications\n- `docs/SERVICE_MESH_ARCHITECTURE.md` — Backend service organization\n\n---\n\n_This document is the authoritative source of truth for the IntegrateWise system architecture. All implementation decisions should align with the principles and specifications outlined here._\n"}