@arach/lattices 0.2.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +172 -86
  3. package/apps/mac/Info.plist +43 -0
  4. package/apps/mac/Lattices.app/Contents/Info.plist +43 -0
  5. package/apps/mac/Lattices.app/Contents/MacOS/Lattices +0 -0
  6. package/apps/mac/Lattices.app/Contents/Resources/AppIcon.icns +0 -0
  7. package/apps/mac/Lattices.app/Contents/Resources/docs/assistant-knowledge.md +130 -0
  8. package/apps/mac/Lattices.app/Contents/Resources/tap.wav +0 -0
  9. package/apps/mac/Lattices.app/Contents/_CodeSignature/CodeResources +150 -0
  10. package/apps/mac/Lattices.entitlements +21 -0
  11. package/apps/mac/Resources/Pets/assistant-spark/pet.json +62 -0
  12. package/apps/mac/Resources/Pets/assistant-spark/spritesheet.webp +0 -0
  13. package/apps/mac/Resources/Pets/scout-ranger/pet.json +6 -0
  14. package/apps/mac/Resources/Pets/scout-ranger/spritesheet.webp +0 -0
  15. package/apps/mac/Resources/tap.wav +0 -0
  16. package/assets/AppIcon.icns +0 -0
  17. package/bin/assistant-intelligence.ts +912 -0
  18. package/bin/cli/capture.ts +252 -0
  19. package/bin/cli/daemon.ts +22 -0
  20. package/bin/cli/helpers.ts +105 -0
  21. package/bin/cli/layer.ts +178 -0
  22. package/bin/cli/runs.ts +43 -0
  23. package/bin/cli/search.ts +141 -0
  24. package/bin/cli/session.ts +32 -0
  25. package/bin/client.ts +17 -0
  26. package/bin/cua.ts +26 -0
  27. package/bin/{daemon-client.js → daemon-client.ts} +49 -30
  28. package/bin/handsoff-infer.ts +96 -0
  29. package/bin/handsoff-worker.ts +531 -0
  30. package/bin/infer.ts +424 -0
  31. package/bin/keychain.ts +75 -0
  32. package/bin/lattices-app.ts +655 -0
  33. package/bin/lattices-build +125 -0
  34. package/bin/lattices-build-env.ts +77 -0
  35. package/bin/lattices-dev +362 -0
  36. package/bin/lattices.ts +3260 -0
  37. package/bin/project-twin.ts +645 -0
  38. package/docs/agent-execution-plan.md +562 -0
  39. package/docs/agent-layer-guide.md +207 -0
  40. package/docs/agents.md +233 -0
  41. package/docs/ai-chat-ux-review.md +416 -0
  42. package/docs/api.md +1041 -47
  43. package/docs/app.md +96 -13
  44. package/docs/assistant-knowledge.md +130 -0
  45. package/docs/companion-deck.md +209 -0
  46. package/docs/component-extraction-roadmap.md +392 -0
  47. package/docs/concepts.md +13 -12
  48. package/docs/config.md +83 -10
  49. package/docs/gesture-customization-proposal.md +520 -0
  50. package/docs/handsoff-test-scenarios.md +84 -0
  51. package/docs/hyperspace-grid-snappiness.md +210 -0
  52. package/docs/layers.md +176 -28
  53. package/docs/mouse-gestures.md +244 -0
  54. package/docs/ocr.md +21 -9
  55. package/docs/overview.md +42 -23
  56. package/docs/presentation-execution-review.md +491 -0
  57. package/docs/prompts/hands-off-system.md +382 -0
  58. package/docs/prompts/hands-off-turn.md +30 -0
  59. package/docs/prompts/voice-advisor.md +31 -0
  60. package/docs/prompts/voice-fallback.md +23 -0
  61. package/docs/proposals/LAT-001-gesture-visual-customization.md +522 -0
  62. package/docs/proposals/LAT-002-shared-overlay-canvas.md +353 -0
  63. package/docs/proposals/LAT-003-menu-bar-controller-architecture.md +291 -0
  64. package/docs/proposals/LAT-004-interactive-overlay-actors.md +534 -0
  65. package/docs/proposals/LAT-005-action-runtime-product-spine.md +914 -0
  66. package/docs/proposals/LAT-006-followup-gaps.md +103 -0
  67. package/docs/proposals/LAT-006-runs-and-capture-in-lattices.md +566 -0
  68. package/docs/proposals/LAT-007-unified-app-shell.md +128 -0
  69. package/docs/quickstart.md +8 -12
  70. package/docs/reference/dewey.config.ts +74 -0
  71. package/docs/reference/install-agent.md +79 -0
  72. package/docs/release.md +172 -0
  73. package/docs/repo-structure.md +100 -0
  74. package/docs/terminal-kit.md +87 -0
  75. package/docs/tiling-reference.md +224 -0
  76. package/docs/twins.md +138 -0
  77. package/docs/voice-command-protocol.md +278 -0
  78. package/docs/voice-error-model.md +73 -0
  79. package/docs/voice.md +221 -0
  80. package/package.json +69 -16
  81. package/packages/npm/sdk/cua.d.mts +1 -0
  82. package/packages/npm/sdk/cua.d.ts +188 -0
  83. package/packages/npm/sdk/cua.mjs +376 -0
  84. package/app/Lattices.app/Contents/Info.plist +0 -24
  85. package/app/Package.swift +0 -13
  86. package/app/Sources/ActionRow.swift +0 -61
  87. package/app/Sources/App.swift +0 -10
  88. package/app/Sources/AppDelegate.swift +0 -234
  89. package/app/Sources/AppShellView.swift +0 -62
  90. package/app/Sources/AppTypeClassifier.swift +0 -70
  91. package/app/Sources/AppWindowShell.swift +0 -63
  92. package/app/Sources/CheatSheetHUD.swift +0 -332
  93. package/app/Sources/CommandModeState.swift +0 -1362
  94. package/app/Sources/CommandModeView.swift +0 -1405
  95. package/app/Sources/CommandModeWindow.swift +0 -192
  96. package/app/Sources/CommandPaletteView.swift +0 -307
  97. package/app/Sources/CommandPaletteWindow.swift +0 -134
  98. package/app/Sources/DaemonProtocol.swift +0 -101
  99. package/app/Sources/DaemonServer.swift +0 -414
  100. package/app/Sources/DesktopModel.swift +0 -121
  101. package/app/Sources/DesktopModelTypes.swift +0 -71
  102. package/app/Sources/DiagnosticLog.swift +0 -271
  103. package/app/Sources/EventBus.swift +0 -30
  104. package/app/Sources/HotkeyManager.swift +0 -250
  105. package/app/Sources/HotkeyStore.swift +0 -338
  106. package/app/Sources/InventoryManager.swift +0 -35
  107. package/app/Sources/InventoryPath.swift +0 -43
  108. package/app/Sources/KeyRecorderView.swift +0 -210
  109. package/app/Sources/LatticesApi.swift +0 -1125
  110. package/app/Sources/MainView.swift +0 -467
  111. package/app/Sources/MainWindow.swift +0 -83
  112. package/app/Sources/OcrModel.swift +0 -309
  113. package/app/Sources/OcrStore.swift +0 -295
  114. package/app/Sources/OmniSearchState.swift +0 -283
  115. package/app/Sources/OmniSearchView.swift +0 -288
  116. package/app/Sources/OmniSearchWindow.swift +0 -105
  117. package/app/Sources/OrphanRow.swift +0 -129
  118. package/app/Sources/PaletteCommand.swift +0 -419
  119. package/app/Sources/PermissionChecker.swift +0 -125
  120. package/app/Sources/Preferences.swift +0 -92
  121. package/app/Sources/ProcessModel.swift +0 -199
  122. package/app/Sources/ProcessQuery.swift +0 -151
  123. package/app/Sources/Project.swift +0 -28
  124. package/app/Sources/ProjectRow.swift +0 -368
  125. package/app/Sources/ProjectScanner.swift +0 -121
  126. package/app/Sources/ScreenMapState.swift +0 -2387
  127. package/app/Sources/ScreenMapView.swift +0 -2820
  128. package/app/Sources/ScreenMapWindowController.swift +0 -89
  129. package/app/Sources/SessionManager.swift +0 -72
  130. package/app/Sources/SettingsView.swift +0 -1053
  131. package/app/Sources/SettingsWindow.swift +0 -20
  132. package/app/Sources/TabGroupRow.swift +0 -178
  133. package/app/Sources/Terminal.swift +0 -259
  134. package/app/Sources/TerminalQuery.swift +0 -156
  135. package/app/Sources/TerminalSynthesizer.swift +0 -200
  136. package/app/Sources/Theme.swift +0 -163
  137. package/app/Sources/TilePickerView.swift +0 -209
  138. package/app/Sources/TmuxModel.swift +0 -53
  139. package/app/Sources/TmuxQuery.swift +0 -81
  140. package/app/Sources/WindowTiler.swift +0 -1755
  141. package/app/Sources/WorkspaceManager.swift +0 -434
  142. package/bin/lattices-app.js +0 -221
  143. package/bin/lattices.js +0 -1418
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Arach Tchoupani
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,37 +1,98 @@
1
1
  <picture>
2
- <img alt="lattices" src="site/public/og.png" />
2
+ <img alt="lattices" src="apps/site/public/og.png" />
3
3
  </picture>
4
4
 
5
5
  # lattices
6
6
 
7
- Declarative tmux sessions for developers.
7
+ The agentic workspace manager for macOS.
8
8
 
9
- One command to create a named tmux session with your tools running. Auto-detects your stack, fully configurable with `.lattices.json`, and a native macOS menu bar app.
9
+ Lattices turns your Mac workspace into a coherent API, so agents can see and
10
+ control windows, terminal sessions, screen text, and layouts. It also gives you
11
+ an assistant to control that workspace in plain language.
12
+
13
+ **[lattices.dev](https://lattices.dev)** · [Docs](https://lattices.dev/docs/overview) · [Download](https://github.com/arach/lattices/releases/latest)
10
14
 
11
15
  ## Install
12
16
 
17
+ ### Download the app
18
+
19
+ Grab the signed DMG from the [latest release](https://github.com/arach/lattices/releases/latest):
20
+
21
+ ```sh
22
+ # Or direct download:
23
+ curl -LO https://github.com/arach/lattices/releases/latest/download/Lattices.dmg
24
+ open Lattices.dmg
25
+ ```
26
+
27
+ Drag **Lattices.app** into Applications. On first launch, a setup wizard
28
+ walks you through granting Accessibility, Screen Recording, and choosing
29
+ your project directory.
30
+
31
+ ### Install the CLI
32
+
13
33
  ```sh
14
34
  npm install -g @arach/lattices
15
35
  ```
16
36
 
37
+ Also published as `@lattices/cli` for existing installs. The CLI and app work
38
+ independently — use either or both.
39
+
40
+ ### Build from source
41
+
42
+ ```sh
43
+ git clone https://github.com/arach/lattices.git
44
+ cd lattices
45
+
46
+ # Install CLI dependencies
47
+ npm install
48
+
49
+ # Build/install/relaunch the dev app at the stable permission target
50
+ ./scripts/run.sh
51
+ ```
52
+
53
+ To build a signed, notarized DMG for distribution:
54
+
55
+ ```sh
56
+ # Requires a Developer ID certificate and notarytool keychain profile
57
+ ./tools/release/build-dmg.sh
58
+
59
+ # Create/update v<package.json version> and upload DMG assets
60
+ ./tools/release/ship.sh
61
+ ```
62
+
63
+ See [Release](docs/release.md) for the CI and local maintainer workflows.
64
+
17
65
  ## Quick start
18
66
 
19
67
  ```sh
20
- cd my-project
68
+ # Show workspace status for the current directory
21
69
  lattices
70
+
71
+ # Launch the menu bar app
72
+ lattices app
73
+
74
+ # Start or reattach a tmux session
75
+ lattices start
76
+
77
+ # Open the command palette from anywhere
78
+ # Cmd+Shift+M
22
79
  ```
23
80
 
24
- That's it. lattices creates a tmux session named after your project with Claude Code on the left and your dev server on the right. It detects your package manager and dev command automatically.
81
+ ## Persistent terminal sessions
25
82
 
26
- ## How it works
83
+ Declare your dev environment in a `.lattices.json`: which panes, which
84
+ commands, what layout. Lattices builds it, runs it, and keeps it alive.
85
+ Close your laptop, reboot, come back a week later — your editor, dev
86
+ server, and test runner are exactly where you left them.
27
87
 
28
- 1. **Run `lattices`** in any project directory
29
- 2. A named tmux session is created with configured panes
30
- 3. Commands start running in each pane immediately
31
- 4. Detach with `Ctrl+b d`, reattach by running `lattices` again
32
- 5. Sessions persist in the background until you kill them
88
+ ```sh
89
+ cd my-project && lattices start
90
+ ```
91
+
92
+ No config? It opens a shell in the project and, when it can, starts your
93
+ detected dev command in a second pane.
33
94
 
34
- ## Configuration
95
+ ### Configuration
35
96
 
36
97
  Drop a `.lattices.json` in your project root:
37
98
 
@@ -39,118 +100,143 @@ Drop a `.lattices.json` in your project root:
39
100
  {
40
101
  "ensure": true,
41
102
  "panes": [
42
- { "name": "claude", "cmd": "claude", "size": 60 },
103
+ { "name": "shell", "size": 60 },
43
104
  { "name": "server", "cmd": "pnpm dev" },
44
105
  { "name": "tests", "cmd": "pnpm test --watch" }
45
106
  ]
46
107
  }
47
108
  ```
48
109
 
49
- ### Pane options
50
-
51
- | Field | Description |
52
- |--------|------------------------------------------|
53
- | `name` | Label for the pane (for your reference) |
54
- | `cmd` | Command to run in the pane |
55
- | `size` | Width % for the first pane (default: 60) |
56
-
57
- ### Session options
58
-
59
- | Field | Description |
60
- |-----------|-----------------------------------------------------------------------------|
61
- | `ensure` | Auto-restart exited commands on reattach |
62
- | `prefill` | Type exited commands into panes on reattach without running (you hit Enter) |
63
-
64
110
  ### Layouts
65
111
 
66
112
  ```
67
- 2 panes — side-by-side 3+ panes — main-vertical
113
+ 2 panes 3+ panes
68
114
 
69
- ┌──────────┬─────────┐ ┌──────────┬─────────┐
70
- claudeserver claudeserver
71
- │ (60%) │ (40%) │ (60%) ├─────────┤
72
- └──────────┴─────────┘ │ │ tests
73
- └──────────┴─────────┘
115
+ ┌──────────┬───────┐ ┌──────────┬───────┐
116
+ shellserver shellserver
117
+ │ (60%) │(40%) │ (60%) ├───────┤
118
+ └──────────┴───────┘ │ │tests
119
+ └──────────┴───────┘
74
120
  ```
75
121
 
76
- ## Auto-detection
122
+ ### Workspace layers
77
123
 
78
- Without a config file, lattices reads your `package.json` and picks the right command:
124
+ Group projects into switchable contexts. `Cmd+Option+1` tiles your
125
+ frontend and API side by side. `Cmd+Option+2` for the mobile stack.
126
+ Sessions stay alive across switches.
79
127
 
80
- - Checks `scripts.dev`, `scripts.start`, `scripts.serve`, `scripts.watch`
81
- - Detects package manager from lock files (pnpm, bun, yarn, npm)
82
- - Falls back to a shell if no dev command is found
128
+ ### Tab groups
83
129
 
84
- ## Menu bar app
130
+ Bundle related repos as tabs in one session. Each tab gets its own
131
+ pane layout from its `.lattices.json`.
85
132
 
86
- A macOS companion app for managing sessions without touching the terminal.
133
+ ```sh
134
+ lattices group vox # Launch iOS, macOS, Web, API as tabs
135
+ lattices tab vox iOS # Switch to the iOS tab
136
+ ```
137
+
138
+ ## Window tiling and awareness
139
+
140
+ A native menu bar app tracks every window across all your monitors.
141
+ Tile with hotkeys, organize into switchable layers, snap to grids.
142
+
143
+ It reads your windows too — extracting text from UI elements every
144
+ 60 seconds and running Vision OCR on background windows every 2 hours.
145
+ Everything is searchable.
87
146
 
88
147
  ```sh
89
- lattices app # Launch (builds from source or downloads binary)
90
- lattices app build # Force rebuild from source
91
- lattices app quit # Stop the menu bar app
148
+ lattices scan # View current screen text
149
+ lattices scan search "error" # Search across all indexed text
150
+ lattices scan recent # Browse scan history
151
+ lattices scan deep # Trigger a Vision OCR scan now
92
152
  ```
93
153
 
94
- Features:
95
- - See all projects and their session status at a glance
96
- - Launch, attach, or detach sessions with a click
97
- - **Command palette** (`Cmd+Shift+M`): Raycast-style launcher for all actions — fuzzy search, keyboard navigation, instant access to projects, window tiling, and settings
98
- - Auto-scans your project directories
99
- - Built with SwiftUI, runs natively on macOS
154
+ ## Voice commands (beta)
100
155
 
101
- The app tries to compile from source first (requires Xcode CLI tools), falling back to a pre-built arm64 binary from GitHub releases.
156
+ Speak to control your workspace tile windows, search, focus apps,
157
+ and launch projects with natural language. Powered by
158
+ [Vox](https://github.com/arach/vox) for transcription and
159
+ local NLEmbedding for intent matching, with Claude fallback for
160
+ ambiguous commands.
102
161
 
103
- ## Tab groups
162
+ Trigger with `Hyper+3` (configurable). Press Space to speak, Space to
163
+ stop. The panel shows what was heard, the matched intent, extracted
164
+ parameters, and execution results.
104
165
 
105
- Bundle related projects as tabs within a single terminal window.
106
- Configure in `~/.lattices/workspace.json`:
166
+ ## A programmable desktop
107
167
 
108
- ```json
109
- {
110
- "name": "my-setup",
111
- "groups": [
112
- {
113
- "id": "talkie",
114
- "label": "Talkie",
115
- "tabs": [
116
- { "path": "/Users/you/dev/talkie-ios", "label": "iOS" },
117
- { "path": "/Users/you/dev/talkie-web", "label": "Website" },
118
- { "path": "/Users/you/dev/talkie-api", "label": "API" }
119
- ]
120
- }
121
- ]
122
- }
168
+ The menu bar app runs a daemon with 35 RPC methods and 5 real-time
169
+ events over WebSocket. Anything you can do from the app, an agent or
170
+ script can do over the API.
171
+
172
+ ```js
173
+ import { daemonCall } from '@arach/lattices/daemon-client'
174
+
175
+ // Search windows by content — title, app, session tags, OCR
176
+ const results = await daemonCall('windows.search', { query: 'myproject' })
177
+
178
+ // Launch and tile
179
+ await daemonCall('session.launch', { path: '/Users/you/dev/frontend' })
180
+ await daemonCall('window.tile', { session: 'frontend-a1b2c3', position: 'left' })
181
+
182
+ // Read the screen
183
+ await daemonCall('ocr.scan')
184
+ const errors = await daemonCall('ocr.search', { query: 'error OR failed' })
123
185
  ```
124
186
 
125
- Each tab gets its own tmux window with pane layout from its `.lattices.json`.
187
+ Or from the CLI:
126
188
 
127
189
  ```sh
128
- lattices groups # List groups with status
129
- lattices group talkie # Launch or attach
130
- lattices tab talkie iOS # Switch to a tab
190
+ lattices search myproject # Find windows by content
191
+ lattices search myproject --deep # Include terminal tab/process data
192
+ lattices search myproject --all # Same as --deep (all search sources)
193
+ lattices place myproject left # Search + focus + tile in one step
131
194
  ```
132
195
 
133
- Groups can also be referenced in [workspace layers](https://lattices.dev/docs/layers) to tile a whole group into a screen position.
196
+ Claude Code skills, MCP servers, or your own scripts can drive your
197
+ desktop the same way you do.
134
198
 
135
- ## CLI reference
199
+ ## CLI
136
200
 
137
201
  ```
138
- lattices Create or reattach to a session for the current project
139
- lattices init Generate a .lattices.json config
140
- lattices ls List active tmux sessions
141
- lattices kill [name] Kill a session (defaults to current project)
142
- lattices group [id] List tab groups or launch/attach a group
143
- lattices groups List all tab groups with status
144
- lattices tab <group> [tab] Switch tab within a group (by label or index)
145
- lattices app Launch the menu bar companion app
202
+ lattices Show workspace status and common commands
203
+ lattices start Create or reattach to current project session
204
+ lattices tmux Alias for lattices start
205
+ lattices init Generate .lattices.json
206
+ lattices ls List active sessions
207
+ lattices kill [name] Kill a session
208
+ lattices search <query> Search windows by title, app, session, OCR
209
+ lattices search <q> --deep Deep search: index + terminal inspection
210
+ lattices search <q> --all Same as --deep (all search sources)
211
+ lattices place <query> [pos] Deep search + focus + tile
212
+ lattices focus <session> Raise a session's window
213
+ lattices tile <position> Tile frontmost window
214
+ lattices group [id] Launch or attach a tab group
215
+ lattices tab <group> [tab] Switch tab within a group
216
+ lattices scan View current screen text
217
+ lattices scan search <q> Search indexed text
218
+ lattices scan deep Trigger Vision OCR now
219
+ lattices app Launch the menu bar app
146
220
  lattices help Show help
147
221
  ```
148
222
 
149
223
  ## Requirements
150
224
 
151
- - **tmux** — `brew install tmux`
152
- - **Node.js** 18+
153
- - **macOS** (the CLI is macOS-only, the menu bar app requires arm64)
225
+ - macOS 26.0+
226
+ - Node.js 18+
227
+
228
+ ### Optional
229
+
230
+ - tmux for persistent terminal sessions (`brew install tmux`)
231
+ - Swift 6.2 / Xcode 26+ to build the menu bar app from source
232
+
233
+ ## Docs
234
+
235
+ Full documentation at [lattices.dev/docs](https://lattices.dev/docs/overview), including:
236
+
237
+ - [API reference](https://lattices.dev/docs/api) — all 35 daemon methods
238
+ - [Layers](https://lattices.dev/docs/layers) — workspace layers and tab groups
239
+ - [Voice commands](https://lattices.dev/docs/voice) — Vox integration
154
240
 
155
241
  ## License
156
242
 
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleIdentifier</key>
6
+ <string>dev.lattices.app</string>
7
+ <key>CFBundleName</key>
8
+ <string>Lattices</string>
9
+ <key>CFBundleDisplayName</key>
10
+ <string>Lattices</string>
11
+ <key>CFBundleExecutable</key>
12
+ <string>Lattices</string>
13
+ <key>CFBundleIconFile</key>
14
+ <string>AppIcon</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>APPL</string>
17
+ <key>CFBundleURLTypes</key>
18
+ <array>
19
+ <dict>
20
+ <key>CFBundleURLName</key>
21
+ <string>dev.lattices.app</string>
22
+ <key>CFBundleURLSchemes</key>
23
+ <array>
24
+ <string>lattices</string>
25
+ </array>
26
+ </dict>
27
+ </array>
28
+ <key>CFBundleVersion</key>
29
+ <string>0.6.1</string>
30
+ <key>CFBundleShortVersionString</key>
31
+ <string>0.6.1</string>
32
+ <key>LSMinimumSystemVersion</key>
33
+ <string>13.0</string>
34
+ <key>LSUIElement</key>
35
+ <true/>
36
+ <key>NSHighResolutionCapable</key>
37
+ <true/>
38
+ <key>NSMicrophoneUsageDescription</key>
39
+ <string>Lattices uses the microphone for Hudson Voice dictation and voice commands.</string>
40
+ <key>NSSupportsAutomaticTermination</key>
41
+ <true/>
42
+ </dict>
43
+ </plist>
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleIdentifier</key>
6
+ <string>dev.lattices.app</string>
7
+ <key>CFBundleName</key>
8
+ <string>Lattices</string>
9
+ <key>CFBundleDisplayName</key>
10
+ <string>Lattices</string>
11
+ <key>CFBundleExecutable</key>
12
+ <string>Lattices</string>
13
+ <key>CFBundleIconFile</key>
14
+ <string>AppIcon</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>APPL</string>
17
+ <key>CFBundleURLTypes</key>
18
+ <array>
19
+ <dict>
20
+ <key>CFBundleURLName</key>
21
+ <string>dev.lattices.app</string>
22
+ <key>CFBundleURLSchemes</key>
23
+ <array>
24
+ <string>lattices</string>
25
+ </array>
26
+ </dict>
27
+ </array>
28
+ <key>CFBundleVersion</key>
29
+ <string>0.6.1</string>
30
+ <key>CFBundleShortVersionString</key>
31
+ <string>0.6.1</string>
32
+ <key>LSMinimumSystemVersion</key>
33
+ <string>13.0</string>
34
+ <key>LSUIElement</key>
35
+ <true/>
36
+ <key>NSHighResolutionCapable</key>
37
+ <true/>
38
+ <key>NSMicrophoneUsageDescription</key>
39
+ <string>Lattices uses the microphone for Hudson Voice dictation and voice commands.</string>
40
+ <key>NSSupportsAutomaticTermination</key>
41
+ <true/>
42
+ </dict>
43
+ </plist>
@@ -0,0 +1,130 @@
1
+ ---
2
+ type: Assistant Knowledge Base
3
+ title: Lattices — Assistant Knowledge
4
+ description: Orientation + capability map the in-app Workspace Assistant uses to explain Lattices and point to the right feature or doc
5
+ audience: assistant
6
+ ---
7
+
8
+ > You are reading the Workspace Assistant's knowledge base. It summarizes what
9
+ > Lattices can do and links to the deeper docs. Treat the **structured context**
10
+ > in your prompt (current settings, file paths, CLI commands) as ground truth for
11
+ > *this user's* configuration; treat this file as ground truth for *how Lattices
12
+ > works*. When a question goes deeper than this summary, name the relevant doc
13
+ > (see [References](#references)) instead of guessing.
14
+
15
+ ## What Lattices is
16
+
17
+ Lattices is an **agentic window manager for macOS** — a programmable workspace
18
+ that pairs a native menu bar app with managed tmux sessions and a scriptable
19
+ agent API. Three layers, one product:
20
+
21
+ 1. **Programmable workspace** — a CLI and a WebSocket agent API (`ws://127.0.0.1:9399`,
22
+ 35+ methods, real-time events) that let scripts and AI agents observe and drive
23
+ the desktop the same way a person does.
24
+ 2. **Smart layout manager** — the menu bar app tracks every window across all
25
+ monitors: tiling, switchable layers, snap zones, and screen-text indexing.
26
+ 3. **Managed tmux sessions** — declare a dev environment in `.lattices.json`;
27
+ Lattices builds it, runs it, and keeps it alive across reboots.
28
+
29
+ Requirements: macOS 26+, Node 18+; tmux only for session management.
30
+ See [Overview](/docs/overview) and [Concepts](/docs/concepts).
31
+
32
+ ## Capability map
33
+
34
+ Each area below is a one-paragraph summary plus the doc to cite for detail.
35
+
36
+ ### Window tiling & placement
37
+ Snap windows to preset positions — halves, quarters, thirds, maximize, center —
38
+ from the command palette or `lattices tile <position>`. There is also a grid
39
+ placement primitive: compact `CxR:c,r` starts at 1 for command entry, while
40
+ canonical `grid:CxR:c,r` starts at 0 for APIs. → [Tiling reference](/docs/tiling-reference), positions in [Configuration](/docs/config).
41
+
42
+ ### Workspace layers & tab groups
43
+ Group projects into named **layers** you can switch between, and tab-group related
44
+ windows. `workspace.json` layers launch/focus/tile projects. Studio layers are
45
+ rule-backed live window sets persisted in `~/.lattices/layers.json`; their clauses
46
+ support app/title/session exact, substring, regex, Space, visibility, and exclusion
47
+ matches. → [Layers](/docs/layers).
48
+
49
+ ### Command palette & menu bar app
50
+ The palette (**Cmd+Shift+M**) is the app's primary surface: launch projects, tile,
51
+ sync, restart, open settings — all searchable. → [Menu Bar App](/docs/app).
52
+
53
+ ### tmux sessions (`.lattices.json`)
54
+ Declare panes, commands, and layout per project. `lattices start` builds/attaches a
55
+ persistent session named `<basename>-<hash>`; `lattices sync` reconciles a running
56
+ session to its config. **Ensure** re-runs exited commands on reattach; **prefill**
57
+ types them and waits. → [Concepts](/docs/concepts), [Configuration](/docs/config).
58
+
59
+ ### Screen OCR & search
60
+ The app reads on-screen text via the Accessibility API (~60s) and Apple Vision OCR
61
+ on background windows (~2h), indexing everything with FTS5. Search across titles,
62
+ app names, session tags, and OCR with `lattices search <query>` (add `--deep` or
63
+ `--all` to inspect terminal tabs by cwd). → [Screen OCR & Search](/docs/ocr).
64
+
65
+ ### Voice commands
66
+ Natural-language voice control for window management ("put the browser on the
67
+ right", "switch to the backend layer"). → [Voice Commands](/docs/voice).
68
+
69
+ ### Mouse gestures
70
+ Hold a mouse button, draw a direction or shape, release — runs the matched action.
71
+ Configured via `mouseGestures.enabled` plus `~/.lattices/mouse-shortcuts.json`.
72
+ → [Mouse Gestures](/docs/mouse-gestures).
73
+
74
+ ### Agent API & CLI
75
+ Agents connect over WebSocket and get the same control as a person: list
76
+ windows/projects, launch sessions, tile, switch layers, read screen text, and
77
+ subscribe to events (`windows.changed`, `tmux.changed`, `layer.switched`).
78
+ → [Agent Guide](/docs/agents), [Agent API](/docs/api).
79
+
80
+ ### Project twins
81
+ Pi-backed project "twins" for mediated, persistent agent execution scoped to a
82
+ project. → [Project Twins](/docs/twins).
83
+
84
+ ## Key shortcuts
85
+
86
+ | Shortcut | Action |
87
+ |----------|--------|
88
+ | **Cmd+Shift+M** | Open the command palette |
89
+ | `lattices tile <position>` | Tile the focused window (CLI) |
90
+ | `lattices layer [name\|index]` | Switch workspace layer (CLI) |
91
+ | **Ctrl+B** then `D` / `Z` / arrows | tmux: detach / zoom / move pane (inside a session) |
92
+
93
+ Tiling and grid hotkeys are user-configurable — for the live set, point the user to
94
+ Settings or the [Tiling reference](/docs/tiling-reference) rather than asserting one.
95
+
96
+ ## CLI quick reference
97
+
98
+ `lattices` · `lattices init` · `lattices sync` · `lattices start` ·
99
+ `lattices restart [pane]` · `lattices tile <position>` · `lattices group [id]` ·
100
+ `lattices layer [name|index]` · `lattices windows --json` ·
101
+ `lattices search <query> [--deep|--all] [--json] [--wid]` · `lattices place <query> [position]` ·
102
+ `lattices app restart`. Full flags: [Configuration](/docs/config).
103
+
104
+ ## Config & file locations
105
+
106
+ - **Per project:** `.lattices.json` in the project root (panes, commands, layout, ensure/prefill).
107
+ - **User config (`~/.lattices/`):** `workspace.json`, `layers.json`, `mouse-shortcuts.json`,
108
+ `snap-zones.json`, `clusters.json`, `ocr.db`, `lattices.log`.
109
+ - **Defaults domain:** `dev.lattices.app` (read/write app settings via `defaults`).
110
+
111
+ The exact current values and paths for *this* machine arrive in your structured
112
+ context — prefer those over the generic paths above when answering.
113
+
114
+ ## References
115
+
116
+ | Topic | Doc |
117
+ |-------|-----|
118
+ | What it is / who it's for | [Overview](/docs/overview) |
119
+ | Install & first run | [Quickstart](/docs/quickstart) |
120
+ | Architecture, glossary, internals | [Concepts](/docs/concepts) |
121
+ | `.lattices.json`, CLI, tile positions | [Configuration](/docs/config) |
122
+ | Command palette, tiling, sessions | [Menu Bar App](/docs/app) |
123
+ | Tiling & grid placement | [Tiling reference](/docs/tiling-reference) |
124
+ | Layers & tab groups | [Layers](/docs/layers) |
125
+ | Screen OCR & full-text search | [Screen OCR & Search](/docs/ocr) |
126
+ | Voice control | [Voice Commands](/docs/voice) |
127
+ | Mouse gestures | [Mouse Gestures](/docs/mouse-gestures) |
128
+ | Agent contracts (voice/CLI/daemon) | [Agent Guide](/docs/agents) |
129
+ | WebSocket RPC method reference | [Agent API](/docs/api) |
130
+ | Project twins | [Project Twins](/docs/twins) |