49 lines
3.4 KiB
Markdown
49 lines
3.4 KiB
Markdown
# PRODUCT.md
|
|
|
|
## Product thesis
|
|
|
|
`mim` is a mobile-first terminal code editor for SSH sessions from an iPhone. It runs as one server-side binary and is designed around narrow viewports, QWERTZ/thumb input, attachable physical keyboards, source patching, and real coding workflows rather than desktop Vim compatibility.
|
|
|
|
## User job
|
|
|
|
A capable developer SSHing into a machine from an iPhone needs to inspect a repo, edit code, navigate files, run builds/tests, read diagnostics, use LSP, check git state, and recover from mistakes without fighting full-keyboard assumptions.
|
|
|
|
## Current alternative
|
|
|
|
The user opens Vim or Neovim over SSH and tolerates bindings, ex commands, splits, plugin/config systems, and punctuation-heavy workflows designed for a desktop keyboard and wider screen.
|
|
|
|
## Mechanism
|
|
|
|
`mim` is protocol-first: the editor core owns buffers, selections, panels, jobs, diagnostics, and session state behind a local socket, while the terminal UI is the first thin client over that protocol. The UI provides a thumb-native leader-key command grammar that remains efficient with an attached physical keyboard, transient panels instead of desktop splits, UTF-8-aware editing, Tree-sitter highlighting, built-in LSP, git, file search/tree, project text search, build output, terminal, and optional Pi assistant integration. The socket path is exported in the session environment so trusted local tools like `pi` can inspect editor state or send explicit commands through the same small protocol. Defaults live in source and are changed by patching and rebuilding, not runtime config files.
|
|
|
|
## Feature-complete boundary
|
|
|
|
Feature-complete means good enough to be the default tool for real small-to-medium code changes over SSH from an iPhone. It includes: protocol/socket + `mimctl`, deterministic replay, UTF-8/cell-width-correct editing, mobile leader/symbol input, narrow transient panels, file tree/search, read-only git workbench, build/test output, terminal escape hatch, Tree-sitter, LSP diagnostics/navigation/actions, viewport-aware hover/signature help, parameter navigation inside calls, and local Pi/tool context through the socket.
|
|
|
|
## Build shape
|
|
|
|
Use layered source plus a few named build targets, not runtime config and not a public feature-flag matrix:
|
|
|
|
- `mim-min`: core editor, socket, replay, TUI, mobile input, open/edit/save/quit.
|
|
- `mim-code`: `mim-min` plus files/search/git/build, Tree-sitter, and LSP.
|
|
- `mim-full`: `mim-code` plus Pi/local tool bridge.
|
|
|
|
If the cuts are wrong, patch the source profile table and rebuild.
|
|
|
|
## Refusals
|
|
|
|
- No runtime config files, plugin system, package manager, or hidden installers.
|
|
- No obligation to preserve Vim default hotkeys or ex-command workflows.
|
|
- No desktop split-first UI on narrow terminals.
|
|
- No remote network control plane; the session socket is local and scoped.
|
|
- No native iOS/Android app, custom mobile keyboard, cloud sync, telemetry, collaborative editing, or tmux replacement until the SSH terminal editor proves it needs them.
|
|
- No public matrix of per-feature compile-time flags.
|
|
|
|
## First useful slice
|
|
|
|
Build the smallest replayable vertical slice: `zig build` produces `mim-min`; it opens a file, edits, saves, renders correctly in a narrow terminal, exposes a local socket, and can replay the session deterministically.
|
|
|
|
## Proof / learning boundary
|
|
|
|
The thesis is validated when the user chooses `mim` over their normal Neovim setup for small real fixes from an iPhone over SSH.
|