How enclosedev/enclose works
Enclose is a macOS desktop workbench for code-built CAD projects: users inspect a 3D model, select a part, describe a change, and have an agent edit and rebuild the project. The map separates the desktop interface, Electron-side project and agent services, shared contracts, and the Python model-writing kit. The README establishes the principal workflow; source-index references and excerpts support only the specific internal links shown. Several substantial subsystems are represented at directory level because their implementations were not sampled.
Main entry points: threads.ts Conversation orchestration · App.tsx App shell · main.ts Electron main · codex.ts Codex integration
Components 21
Desktop interface
- App shell
apps/desktop/src/App.tsx - 3D viewport
apps/desktop/src/components/viewport - Conversation UI
apps/desktop/src/components/thread.tsx - Message composer
apps/desktop/src/components/composer.tsx - Blueprint view
apps/desktop/src/components/blueprint/blueprint.tsx
Desktop services
- Project management
apps/desktop/electron/projects.ts - Conversation orchestration
apps/desktop/electron/threads.ts - Change handling
apps/desktop/electron/changes.ts - Agent providers
apps/desktop/electron/providers.ts - Claude integration
apps/desktop/electron/claude.ts - Codex integration
apps/desktop/electron/codex.ts - Grok integration
apps/desktop/electron/grok.ts - CAD import
apps/desktop/electron/imports.ts - Agent tools
apps/desktop/electron/tools.ts - Settings
apps/desktop/electron/settings.ts - Electron main
apps/desktop/electron/main.ts
Shared contracts
- IPC API contracts
apps/desktop/shared/api.ts
Model generation
- STEP model writer
kit/enclose.py
Other components
- CAD user
- Local CAD project
- Claude Code
Connections 28
- CAD user → App shell: uses
README.md - App shell → 3D viewport: renders
apps/desktop/src/App.tsx - App shell → Conversation UI: renders
apps/desktop/src/App.tsx - Conversation UI → Message composer: includes
- CAD user → 3D viewport: inspects model
README.md - CAD user → Conversation UI: requests changes
README.md - Electron main → Project management: manages projects
apps/desktop/electron/main.ts - Electron main → Claude integration: lists commands
apps/desktop/electron/main.ts - Conversation orchestration → Change handling: uses
apps/desktop/electron/threads.ts - Conversation orchestration → Claude integration: uses
apps/desktop/electron/threads.ts - Conversation orchestration → Codex integration: uses
apps/desktop/electron/threads.ts - Conversation orchestration → Grok integration: uses
apps/desktop/electron/threads.ts - Conversation orchestration → CAD import: uses
apps/desktop/electron/threads.ts - Conversation orchestration → Project management: uses
apps/desktop/electron/threads.ts - Claude integration → Agent providers: uses
apps/desktop/electron/claude.ts - Codex integration → Agent providers: uses
apps/desktop/electron/codex.ts - Codex integration → IPC API contracts: uses contracts
apps/desktop/electron/codex.ts - Conversation orchestration → IPC API contracts: uses contracts
apps/desktop/electron/threads.ts - App shell → IPC API contracts: uses contracts
apps/desktop/shared/api.ts - Electron main → Claude Code: queries commands
- CAD user → Local CAD project: opens project
README.md - STEP model writer → Local CAD project: writes model data
kit/enclose.py - Local CAD project → 3D viewport: displays model
- Project management → Local CAD project: manages files
- Change handling → Local CAD project: updates project
- Conversation orchestration → Agent providers: selects agent
apps/desktop/electron/threads.ts - CAD user → Blueprint view: views drawings
- App shell → Settings: opens settings