{"slug":"business/REPOSITION_MAP","title":"IntegrateWise Repository Layer Mapping (REPOSITIONMAP)","section":"business","sectionLabel":"Business","status":"unclassified","type":"document","path":"business/REPOSITION_MAP.mdx","bytes":3576,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n> **Tier C — Historical.** This document is a point-in-time snapshot preserved for reference. For current architecture, see [CANONICAL_PLATFORM_ARCHITECTURE.md](../architecture/CANONICAL_PLATFORM_ARCHITECTURE.md).\n\nThis file maps the active codebase directories to the 9 logical architecture layers. To maintain codebase integrity and comply with the [AGENTS.md](file:///Users/nirmal/integratewise-live/AGENTS.md) safety protocol, physical directories are kept in their canonical locations, and this schema serves as the authoritative map.\n\n---\n\n## 🗺️ Layer Mapping Schema\n\n```json\n{\n  \"project\": \"integratewise-live\",\n  \"version\": \"3.8.0\",\n  \"layers\": {\n    \"auth\": {\n      \"description\": \"Authentication, JWT verification, and credential handling\",\n      \"paths\": [\"services/gateway/src/auth.ts\", \"services/tenants/\"]\n    },\n    \"ingress\": {\n      \"description\": \"Webhook receivers, delta monitors, and file event listeners\",\n      \"paths\": [\"services/webhook-ingress/\", \"services/folder-watcher/\", \"services/connector-sync/\"]\n    },\n    \"userworkbench\": {\n      \"description\": \"Dashboard interface workbench and read projections\",\n      \"paths\": [\"apps/web/\", \"services/gateway/src/workspace-spine.ts\"]\n    },\n    \"intelligent_layer\": {\n      \"description\": \"Cognitive reasoning engines, AI gateway, and sandbox agents\",\n      \"paths\": [\"services/intelligence/\"]\n    },\n    \"twin_workbench\": {\n      \"description\": \"Stateful user twin conversational runtime and sessions\",\n      \"paths\": [\"services/iw-agent-runtime/\"]\n    },\n    \"memory\": {\n      \"description\": \"KB ingestion, semantic D1 chunks, and Vectorize indexes\",\n      \"paths\": [\"services/knowledge/\", \"/Users/nirmal/.iw-memory/\"]\n    },\n    \"notification\": {\n      \"description\": \"Governance approvals, workflows, and billing escalations\",\n      \"paths\": [\"services/workflow/\", \"services/billing/\", \"services/intelligence/src/handoff/\"]\n    },\n    \"spine\": {\n      \"description\": \"Canonical database partitions and normalization pipeline\",\n      \"paths\": [\"services/pipeline/\"]\n    },\n    \"backend\": {\n      \"description\": \"Shared configurations, connectors, and admin utilities\",\n      \"paths\": [\"packages/types/\", \"packages/connectors/\", \"services/admin/\"]\n    }\n  }\n}\n```\n\n---\n\n## 📂 Physical Directory Structure\n\n```\nintegratewise-live/\n├── apps/\n│   ├── web/                        <-- [userworkbench] React/Next.js Workbench UI\n│   └── web-frontend-reference/     <-- Reference Layout Components\n├── services/\n│   ├── gateway/                    <-- [auth] JWT resolution & D1 projections\n│   ├── webhook-ingress/            <-- [ingress] Webhook membrane\n│   ├── folder-watcher/             <-- [ingress] DO file monitor\n│   ├── connector-sync/             <-- [ingress] Delta pollers\n│   ├── intelligence/               <-- [intelligent_layer] Cognitive Think/Act/Govern agents\n│   ├── iw-agent-runtime/           <-- [twin_workbench] Stateful TwinAgent DO\n│   ├── knowledge/                  <-- [memory] KB indexing (D1/R2/Vectorize)\n│   ├── workflow/                   <-- [notification] Workflow scheduler\n│   ├── billing/                    <-- [notification] Stripe subscriptions\n│   └── pipeline/                   <-- [spine] Stage 1-8 Normalizer\n└── packages/\n    ├── types/                      <-- [backend] Shared schemas\n    └── connectors/                 <-- [backend] Connector integrations\n```\n"}