cli-jaw 1.7.19 → 1.7.21

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 (77) hide show
  1. package/README.ko.md +183 -441
  2. package/README.md +252 -480
  3. package/README.zh-CN.md +184 -442
  4. package/dist/bin/commands/dispatch.js +1 -1
  5. package/dist/bin/commands/dispatch.js.map +1 -1
  6. package/dist/bin/commands/doctor.js +47 -11
  7. package/dist/bin/commands/doctor.js.map +1 -1
  8. package/dist/bin/commands/serve.js +4 -3
  9. package/dist/bin/commands/serve.js.map +1 -1
  10. package/dist/server.js +43 -21
  11. package/dist/server.js.map +1 -1
  12. package/dist/src/agent/events.js +1 -0
  13. package/dist/src/agent/events.js.map +1 -1
  14. package/dist/src/agent/spawn.js +16 -0
  15. package/dist/src/agent/spawn.js.map +1 -1
  16. package/dist/src/cli/registry.js +1 -0
  17. package/dist/src/cli/registry.js.map +1 -1
  18. package/dist/src/core/claude-install.js +33 -0
  19. package/dist/src/core/claude-install.js.map +1 -0
  20. package/dist/src/core/config.js +5 -0
  21. package/dist/src/core/config.js.map +1 -1
  22. package/dist/src/core/db.js +1 -0
  23. package/dist/src/core/db.js.map +1 -1
  24. package/dist/src/core/employees.js +0 -1
  25. package/dist/src/core/employees.js.map +1 -1
  26. package/dist/src/core/runtime-path.js +3 -0
  27. package/dist/src/core/runtime-path.js.map +1 -1
  28. package/dist/src/core/settings-merge.js +2 -2
  29. package/dist/src/core/settings-merge.js.map +1 -1
  30. package/dist/src/discord/bot.js +123 -107
  31. package/dist/src/discord/bot.js.map +1 -1
  32. package/dist/src/orchestrator/distribute.js +1 -2
  33. package/dist/src/orchestrator/distribute.js.map +1 -1
  34. package/dist/src/orchestrator/pipeline.js +3 -15
  35. package/dist/src/orchestrator/pipeline.js.map +1 -1
  36. package/dist/src/orchestrator/scope.js +9 -3
  37. package/dist/src/orchestrator/scope.js.map +1 -1
  38. package/dist/src/orchestrator/state-machine.js +12 -3
  39. package/dist/src/orchestrator/state-machine.js.map +1 -1
  40. package/dist/src/prompt/builder.js +0 -4
  41. package/dist/src/prompt/builder.js.map +1 -1
  42. package/dist/src/prompt/templates/a1-system.md +2 -2
  43. package/dist/src/prompt/templates/worker-context.md +2 -2
  44. package/dist/src/routes/orchestrate.js +6 -1
  45. package/dist/src/routes/orchestrate.js.map +1 -1
  46. package/dist/src/security/network-acl.js +133 -0
  47. package/dist/src/security/network-acl.js.map +1 -0
  48. package/dist/src/telegram/bot.js +37 -3
  49. package/dist/src/telegram/bot.js.map +1 -1
  50. package/package.json +1 -1
  51. package/public/dist/assets/{constants-Bzu8ZQYX.js → constants-DGOVap6o.js} +1 -1
  52. package/public/dist/assets/{employees-BbOvchcS.js → employees-C0yujZsW.js} +1 -1
  53. package/public/dist/assets/{index-BG6dRmXR.js → index-BWcXMhOZ.js} +4 -4
  54. package/public/dist/assets/{memory-ZuWr4pMd.js → memory-FFmqjyCC.js} +1 -1
  55. package/public/dist/assets/memory-irEuKgdV.js +1 -0
  56. package/public/dist/assets/{render-DJB99y40.js → render-D1FcBRwU.js} +1 -1
  57. package/public/dist/assets/{settings-D1g7w3t4.js → settings-MICU1hXS.js} +1 -1
  58. package/public/dist/assets/settings-my0MZC-q.js +1 -0
  59. package/public/dist/assets/skills--Z8gqYp5.js +1 -0
  60. package/public/dist/assets/{skills-C5kJQVkS.js → skills-BzRE-_tP.js} +1 -1
  61. package/public/dist/assets/{slash-commands-ByfeM4Ot.js → slash-commands-DH53hTco.js} +1 -1
  62. package/public/dist/assets/slash-commands-u5fbLK7K.js +1 -0
  63. package/public/dist/assets/ui-CfUxt-FY.js +1 -0
  64. package/public/dist/assets/{ui-BR_M9U08.js → ui-DZb07Luj.js} +2 -2
  65. package/public/dist/assets/{ws-BgwVESAY.js → ws-PsjiwLxs.js} +2 -2
  66. package/public/dist/index.html +1 -1
  67. package/public/js/constants.ts +0 -1
  68. package/public/js/features/employees.ts +0 -2
  69. package/public/locales/en.json +1 -2
  70. package/public/locales/ko.json +1 -2
  71. package/scripts/install.sh +175 -3
  72. package/dist/src/prompt/templates/research-worker.md +0 -37
  73. package/public/dist/assets/memory-BLIJdS7I.js +0 -1
  74. package/public/dist/assets/settings-DRL_RTEF.js +0 -1
  75. package/public/dist/assets/skills-DDi6QuNI.js +0 -1
  76. package/public/dist/assets/slash-commands-Ds50o_kN.js +0 -1
  77. package/public/dist/assets/ui-hKRh1sfy.js +0 -1
package/README.md CHANGED
@@ -1,18 +1,14 @@
1
1
  <div align="center">
2
2
 
3
- # 🦈 CLI-JAW
3
+ # CLI-JAW
4
4
 
5
- ### Your Personal AI Assistant Powered by 5 AI Engines
5
+ ### All your AI subscriptions. One assistant.
6
6
 
7
- *One assistant. Five brains. Always on.*
8
-
9
- [![Tests](https://img.shields.io/badge/tests-rolling%20inventory-blue)](#-tests)
7
+ [![npm](https://img.shields.io/npm/v/cli-jaw)](https://npmjs.com/package/cli-jaw)
10
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue)](https://typescriptlang.org)
11
9
  [![Node](https://img.shields.io/badge/node-%3E%3D22-blue)](https://nodejs.org)
12
10
  [![License](https://img.shields.io/badge/license-MIT-yellow)](LICENSE)
13
- [![npm](https://img.shields.io/npm/v/cli-jaw)](https://npmjs.com/package/cli-jaw)
14
- [![Docker](https://img.shields.io/badge/Docker-supported-2496ED?logo=docker&logoColor=white)](#-docker--container-isolation)
15
- [![Platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20WSL%20%7C%20Docker-lightgrey)](#)
11
+ [![Docker](https://img.shields.io/badge/Docker-supported-2496ED?logo=docker&logoColor=white)](#-docker)
16
12
 
17
13
  **English** / [한국어](README.ko.md) / [中文](README.zh-CN.md)
18
14
 
@@ -20,144 +16,122 @@
20
16
 
21
17
  </div>
22
18
 
23
- ## Quick Links
19
+ <table>
20
+ <tr><td><b>Your existing subscriptions, unified</b></td><td>Claude Max, ChatGPT Pro, Copilot, Gemini Advanced — route through OAuth. Add any model via OpenCode. No per-token billing.</td></tr>
21
+ <tr><td><b>Lives where you do</b></td><td>Web PWA with virtual scroll and WS streaming, Mac WebView app, terminal TUI, Telegram with voice, Discord — five surfaces, one conversation.</td></tr>
22
+ <tr><td><b>3-layer memory</b></td><td>History Block (recent sessions) + Memory Flush (episodes, daily logs) + Soul and Task Snapshot (identity, semantic recall). SQLite FTS5 full-text search.</td></tr>
23
+ <tr><td><b>Multi-agent orchestration</b></td><td>PABCD — a DB-persisted 5-phase FSM. Employee system with worker registry. Parallel subtasks with file-overlap detection. You approve every phase.</td></tr>
24
+ <tr><td><b>Browser and desktop automation</b></td><td>Chrome CDP, vision-click, DOM reference for ChatGPT/Grok/Gemini, Computer Use integration via Codex App, diagram skill for SVG and interactive visualizations.</td></tr>
25
+ <tr><td><b>MCP install once, 5 engines</b></td><td><code>jaw mcp install</code> syncs to Claude, Codex, Gemini, OpenCode, and Copilot simultaneously. One config file.</td></tr>
26
+ <tr><td><b>Speaks your language</b></td><td>English, Korean, Chinese README. i18n web UI. HWP/HWPX Korean office document support via OfficeCLI.</td></tr>
27
+ </table>
28
+
29
+ ---
30
+
31
+ ## Quick links
24
32
 
25
- - [Install & Run](#-install--run-30-seconds) · [Authenticate](#-authenticate-your-ai-engines) · [What is CLI-JAW?](#what-is-cli-jaw)
26
- - [Features](#what-can-your-assistant-do) · [Skills](#-skill-system) · [Telegram](#-telegram--your-assistant-in-your-pocket) · [Voice & STT](#-voice--stt--speech-to-text)
27
- - [PABCD Orchestration](#-multi-agent-orchestration--pabcd) · [MCP](#-mcp--one-config-six-ai-engines) · [CLI Commands](#️-cli-commands)
28
- - [Multi-Instance](#️-multi-instance--separate-projects-separate-contexts) · [Models](#-models) · [Docker](#-docker--container-isolation)
29
- - [Development](#️-development) · [Tests](#-tests) · [Docs](#-documentation) · [Troubleshooting](#-troubleshooting) · [Contributing](#-contributing)
33
+ - [Install](#-install--run) · [Authenticate](#-authenticate) · [Surfaces](#-where-it-lives)
34
+ - [Engine routing](#-engine-routing) · [Memory](#-memory) · [PABCD](#-orchestration--pabcd) · [Skills](#-skills)
35
+ - [Browser automation](#-browser--desktop-automation) · [MCP](#-mcp) · [Messaging](#-messaging)
36
+ - [CLI commands](#%EF%B8%8F-cli-commands) · [Docker](#-docker) · [Docs](#-documentation) · [How it compares](#-how-it-compares)
30
37
 
31
38
  <details>
32
- <summary>🪟 <b>Are you on Windows?</b> — WSL One-Click Setup</summary>
39
+ <summary>Are you on Windows? — WSL one-click setup</summary>
33
40
 
34
- **Step 1: Install WSL** (PowerShell as Admin — one time only)
41
+ **Step 1: Install WSL** (PowerShell as Admin)
35
42
 
36
43
  ```powershell
37
44
  wsl --install
38
45
  ```
39
46
 
40
- Restart your computer when prompted. After reboot, open **Ubuntu** from the Start Menu.
47
+ Restart, then open **Ubuntu** from the Start Menu.
41
48
 
42
- **Step 2: Install CLI-JAW** (in the Ubuntu/WSL terminal)
49
+ **Step 2: Install CLI-JAW**
43
50
 
44
51
  ```bash
45
52
  curl -fsSL https://raw.githubusercontent.com/lidge-jun/cli-jaw/master/scripts/install-wsl.sh | bash
46
53
  ```
47
54
 
48
- The script automatically installs WSL prerequisites, Node.js 22+, user-local npm globals, browser deps, OfficeCLI, and CLI-JAW.
49
-
50
- **Step 3: Reload your shell** (important — picks up PATH changes)
55
+ **Step 3: Reload shell and start**
51
56
 
52
57
  ```bash
53
58
  source ~/.bashrc
59
+ copilot login # or: claude auth / codex login / gemini
60
+ jaw serve # → http://localhost:3457
54
61
  ```
55
62
 
56
- **Step 4: Authenticate an AI Engine** (pick one)
57
-
58
- ```bash
59
- copilot login # GitHub Copilot (Free)
60
- opencode # OpenCode (Free models available)
61
- claude auth # Anthropic Claude
62
- codex login # OpenAI Codex
63
- gemini # Google Gemini
64
- ```
65
-
66
- **Step 5: Start Chatting**
67
-
68
- ```bash
69
- jaw serve
70
- # → http://localhost:3457
71
- ```
72
-
73
- > 💡 The script uses [fnm](https://github.com/Schniz/fnm) for Node.js management. If you already have `nvm`, it will use that instead.
74
-
75
63
  <details>
76
- <summary>🔧 <b>Troubleshooting WSL</b></summary>
64
+ <summary>Troubleshooting WSL</summary>
77
65
 
78
- | Problem | Fix |
79
- | --------------------------------------- | ------------------------------------------------------ |
80
- | `unzip: command not found` | Rerun the installer — it now auto-installs `unzip` |
81
- | `jaw: command not found` after install | Run `source ~/.bashrc` to reload PATH |
82
- | Still can't find `jaw` | Run `export PATH="$(npm config get prefix)/bin:$PATH"` |
83
- | Permission errors with `npm install -g` | Run `sudo chown -R $USER $(npm config get prefix)` |
84
- | `sudo` keeps blocking later tasks | Rerun the WSL installer so it can install system deps once, then check `jaw doctor --json` for `wsl.sudoNonInteractive` and `wsl.npmPrefix` |
66
+ | Problem | Fix |
67
+ |---|---|
68
+ | `unzip: command not found` | Rerun the installer |
69
+ | `jaw: command not found` | `source ~/.bashrc` |
70
+ | Permission errors | `sudo chown -R $USER $(npm config get prefix)` |
85
71
 
86
72
  </details>
87
-
88
73
  </details>
89
74
 
90
75
  <details>
91
- <summary>🍎 <b>New to the terminal?</b> — One-click Node.js + CLI-JAW install</summary>
92
-
93
- **Step 1: Open Terminal**
94
-
95
- Open **Finder** → **Applications** → **Utilities** → **Terminal.app**
96
- (or press `⌘ Space` and type `Terminal`)
76
+ <summary>New to the terminal? — One-click install (macOS)</summary>
97
77
 
98
- **Step 2: Paste this and hit Enter**
78
+ 1. Open **Terminal** (`Cmd + Space` type `Terminal`)
79
+ 2. Paste and hit Enter:
99
80
 
100
81
  ```bash
101
82
  curl -fsSL https://raw.githubusercontent.com/lidge-jun/cli-jaw/master/scripts/install.sh | bash
102
83
  ```
103
84
 
104
- This installs Node.js + CLI-JAW automatically. Just wait until you see 🎉.
105
-
106
- **Step 3: Login & Launch**
85
+ 3. Authenticate and launch:
107
86
 
108
87
  ```bash
109
- copilot login # or: claude auth / codex login / gemini login
110
- jaw serve
88
+ copilot login
89
+ jaw serve # → http://localhost:3457
111
90
  ```
112
91
 
113
- Open **http://localhost:3457** in your browser. That's it! 🦈
114
-
115
92
  </details>
116
93
 
117
94
  ---
118
95
 
119
- ## 🚀 Install & Run (30 seconds)
96
+ ## 🚀 Install & run
120
97
 
121
98
  ```bash
122
99
  npm install -g cli-jaw
123
100
  jaw serve
124
101
  ```
125
102
 
126
- **That's it.** Open **http://localhost:3457** and start chatting. 🦈
127
-
128
- > 🕐 **Want it running 24/7?** `jaw service install` — auto-detects systemd, launchd, or Docker.
103
+ Open **http://localhost:3457**. Requires Node.js 22+ and at least one AI CLI authenticated below.
129
104
 
130
- > Requires **Node.js 22** ([download](https://nodejs.org)) and **at least 1 AI CLI** authenticated below.
131
-
132
- > 🔒 **Shared path policy:** cli-jaw uses `~/.cli-jaw/*` by default. It does **not** modify shared harness paths (`~/.agents/*`, `~/.agent/*`, `~/.claude/*`) unless you explicitly opt in. See `jaw doctor --repair-shared-paths` to detect or fix contamination from older versions.
105
+ > `jaw service install` auto-start on boot (systemd, launchd, or Docker, auto-detected).
106
+ >
107
+ > Claude Code note: if you need Anthropic computer-use MCP, prefer the native Claude installer (`curl -fsSL https://claude.ai/install.sh | bash` or `claude install`). `jaw doctor` now warns when `claude` looks npm/bun-managed.
133
108
 
134
109
  ---
135
110
 
136
- ## 🔑 Authenticate Your AI Engines
111
+ ## 🔑 Authenticate
137
112
 
138
- You only need **one** pick whichever you have:
113
+ You only need one. Pick whichever subscription you already have:
139
114
 
140
115
  ```bash
141
- # ── Free options ──
142
- copilot login # GitHub Copilot (free tier)
143
- opencode # OpenCode — auto-auth on first run (free models available)
144
-
145
- # ── Paid options ──
146
- claude auth # Anthropic Claude
147
- codex login # OpenAI Codex
148
- gemini # Google Gemini — first run triggers auth
116
+ # Free
117
+ copilot login # GitHub Copilot
118
+ opencode # OpenCode — free models available
119
+
120
+ # Paid (monthly subscription)
121
+ claude auth # Anthropic Claude Max (computer-use MCP users: native Claude install recommended)
122
+ codex login # OpenAI ChatGPT Pro (npm/bun installs are fine)
123
+ gemini # Google Gemini Advanced
149
124
  ```
150
125
 
151
- Check what's ready: `jaw doctor`
126
+ Check status: `jaw doctor`
152
127
 
153
128
  <details>
154
- <summary>📋 Example <code>jaw doctor</code> output</summary>
129
+ <summary>Example jaw doctor output</summary>
155
130
 
156
131
  ```
157
132
  🦈 CLI-JAW Doctor — 12 checks
158
133
 
159
134
  ✅ Node.js v22.15.0
160
- ✅ npm v10.9.4
161
135
  ✅ Claude CLI installed
162
136
  ✅ Codex CLI installed
163
137
  ⚠️ Gemini CLI not found (optional)
@@ -172,453 +146,301 @@ Check what's ready: `jaw doctor`
172
146
 
173
147
  </details>
174
148
 
175
- > 💡 **You don't need all 5.** Even one CLI is enough. Your assistant auto-detects which engines are available and falls back gracefully.
176
-
177
149
  ---
178
150
 
179
- ## What is CLI-JAW?
180
-
181
- CLI-JAW is a **personal AI assistant** that lives on your machine and works from the interfaces you already use — **Web, Terminal, Telegram, and Discord**. Ask it anything, delegate tasks, automate your workflows.
182
- ![1772128366759](image/README/1772128366759.png)
183
-
184
- > 💬 *"Summarize today's schedule"* → answer on Telegram
185
- > 💬 *"Refactor this module and write tests"* → sub-agents handle it while you grab coffee
186
- > 💬 *"Download that PDF and put the key points in Notion"* → browser + Notion skill, done
151
+ ## 🖥️ Where it lives
187
152
 
188
- Unlike single-model assistants, CLI-JAW orchestrates **5 AI engines** (Claude, Codex, Gemini, OpenCode, Copilot) through their official CLIs — giving you the best of every provider in one unified experience. If one engine is busy, it automatically falls back to the next. **100+ built-in skills** handle everything from browser automation to document generation.
153
+ CLI-JAW works from five surfaces. Same assistant, same memory, same skills across all of them.
189
154
 
190
- | | Why CLI-JAW? |
191
- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
192
- | 🛡️**TOS-Safe** | Uses official CLIs only no API key scraping, no reverse engineering, no ban risk. |
193
- | 🤖**Verified Agent Tools** | 5 battle-tested coding agents (Claude, Codex, Gemini, OpenCode, Copilot) under one roof. |
194
- | ⚡**Multi-Agent Fallback** | One engine down? The next picks up automatically. Zero downtime. |
195
- | 🎭**PABCD Orchestration** | DB-persisted FSM pipeline Plan Audit Build Check → Done. Workers are read-only. You approve every phase. |
196
- | 📦**100+ Built-in Skills** | Browser automation, document generation, Telegram/Discord, memory ready out of the box. |
197
- | 🖥️**Cross-Platform** | macOS, Linux, Windows — ENOENT-safe CLI spawn, auto-detection,`.cmd` shim support, and native install all work across platforms. |
198
-
199
- ![CLI-JAW Terminal](docs/screenshots/terminal-cli.png)
155
+ | Surface | What you get |
156
+ |---|---|
157
+ | **Web PWA** | Full UI with markdown/KaTeX/Mermaid rendering, virtual scroll, WS streaming, drag-and-drop file upload, voice recording, PABCD roadmap bar, i18n (English, Korean), dark/light theme, offline message cache via IndexedDB |
158
+ | **Mac WebView app** | `jaw serve` wrapped in a native macOS app shell. Access from Dock without opening a browser |
159
+ | **Terminal TUI** | Multiline editing, slash-command autocomplete, overlay selectors, session persistence, resume classification |
160
+ | **Telegram** | Voice messages (multi-provider STT), photos, files. Scheduled task results delivered automatically. Slash commands for model/CLI switching |
161
+ | **Discord** | Text and file messaging, command sync, channel/thread routing, forwarder for agent results |
200
162
 
201
163
  ---
202
164
 
203
- ## 🆕 What's New (v1.6.0)
204
-
205
- `v1.6.0` is the documentation catch-up release that finally summarizes the major product expansion that happened after `v1.2.0`.
165
+ ## 🔀 Engine routing
206
166
 
207
- - Full update log: [CHANGELOG.md](CHANGELOG.md#160---2026-04-13)
208
- - Range covered: `v1.2.0` → `v1.5.1`
209
- - Scope: `59` commits, `307` files changed, `32,760` insertions, `4,263` deletions
210
- - Theme: CLI-JAW grew from a capable personal assistant into a broader operating environment with richer orchestration, memory, channels, UI, and release tooling
167
+ Five CLI backends, routed through OAuth subscriptions you already pay for. No per-token API billing.
211
168
 
212
- | Feature | Description |
213
- | ------- | ----------- |
214
- | 🎭 **PABCD Orchestration** | Orchestration is now a first-class surface: `jaw dispatch`, `jaw orchestrate`, persisted PABCD state, worker registry, research dispatch, and live orchestration status in the product. |
215
- | 🧠 **Structured Memory Runtime** | Memory moved beyond plain persistence into a layered indexed subsystem: structured storage, bootstrap/migration, SQLite FTS5 indexing, query expansion, task snapshots, and UI controls for audit/reindex flows. |
216
- | 💬 **Discord + Voice Channels** | CLI-JAW now works across Web, Terminal, Telegram, and Discord. Voice/STT also became a first-class workflow with web recording, Telegram voice handling, and provider-configurable transcription. |
217
- | 🖥️ **Major Web UI Expansion** | The web app gained richer settings panes, memory and heartbeat controls, tool UI, provider icons, gesture handling, drag/drop protections, stronger streaming render behavior, and virtual scrolling. |
218
- | 📊 **Diagram & Widget Rendering** | Inline diagrams and sandboxed widget rendering became visible product features, backed by dedicated iframe rendering, validation, and CSS/runtime updates. |
219
- | ⌨️ **CLI/TUI Usability Pass** | Terminal workflows now include `/compact`, better overlays and selectors, session persistence, resume classification, readiness checks, and more stable command handling. |
220
- | 🧪 **Ops, CI, and Installability** | `jaw doctor`, browser launch policy, skill reset/fallback behavior, submodule-safe CI, preview releases, Vite-based frontend delivery, service worker assets, and stronger install troubleshooting all improved. |
221
- | 📄 **Office Automation Maturity** | OfficeCLI integration, smoke tests, local binaries, and Office/PDF workflows are much more production-ready than they were at `v1.2.0`. |
169
+ | CLI | Default model | Auth | Cost model |
170
+ |---|---|---|---|
171
+ | **Claude** | `opus-4-6` | `claude auth` | Claude Max subscription |
172
+ | **Codex** | `gpt-5.5` | `codex login` | ChatGPT Pro subscription |
173
+ | **Gemini** | `gemini-3.1-pro-preview` | `gemini` | Gemini Advanced subscription |
174
+ | **OpenCode** | `minimax-m2.7` | `opencode` | Free models available |
175
+ | **Copilot** | `gpt-5-mini` | `copilot login` | Free tier available |
222
176
 
223
- ---
177
+ **Fallback chain**: if one engine is rate-limited or down, the next picks up automatically. Configure with `/fallback [cli1 cli2...]`.
224
178
 
225
- ## What can your assistant do?
226
-
227
- ```mermaid
228
- graph LR
229
- YOU["👤 You"] -->|Web / Terminal / Telegram| JAW["🦈 CLI-JAW"]
230
- JAW -->|spawn| C["Claude"]
231
- JAW -->|spawn| X["Codex"]
232
- JAW -->|spawn| G["Gemini"]
233
- JAW -->|spawn| O["OpenCode"]
234
- JAW -->|spawn| P["Copilot"]
235
- JAW -->|inject| SK["📦 Skills"]
236
- JAW -->|control| BR["🌐 Chrome"]
237
- JAW -->|send| TG["📱 Telegram"]
238
-
239
- style JAW fill:#f5e6d3,stroke:#d4a574,stroke-width:2px,color:#5c4033
240
- ```
179
+ **OpenCode wildcard**: connect any model endpoint — OpenRouter, local LLMs, or any OpenAI-compatible API.
241
180
 
242
- - 🤖 **5 AI engines, 1 assistant** Claude · Codex · Gemini · OpenCode · Copilot. Switch with `/cli`.
243
- - ⚡ **Auto fallback** — If one engine is down, the next picks up seamlessly.
244
- - 🎭 **Multi-agent orchestration** — Complex tasks get split across specialized sub-agents automatically.
245
- - 🎤 **Voice input** — Mic button on the web + Telegram voice messages. Multi-provider STT (OpenAI, Vertex AI).
246
- - 📝 **Prompt templates** — Create, manage, and reuse prompt templates with a visual node-map editor.
247
- - 📦 **100+ skills** — Browser control, file editing, image generation, web search, and [much more](#-skill-system).
248
- - 🧠 **Persistent memory** — Your assistant remembers past conversations and preferences across sessions.
249
- - 📱 **Telegram bot** — Chat with your assistant from your phone, send voice/photos/files.
250
- - 🌐 **Browser automation** — Your assistant can navigate the web, click, type, and screenshot.
251
- - 🔌 **MCP ecosystem** — Install once, available to all 5 AI engines instantly.
252
- - 🔍 **Web search** — Real-time information via MCP tools.
253
- - ⏰ **Heartbeat jobs** — Schedule recurring tasks that run automatically.
181
+ > Switch engines: `/cli codex`. Switch models: `/model gpt-5.5`. All from Web, Terminal, Telegram, or Discord.
254
182
 
255
183
  ---
256
184
 
257
- ## 📦 Skill System
185
+ ## 🧠 Memory
258
186
 
259
- **100+ skills** out of the box — browser, github, notion, telegram, memory, pdf, image generation, and [much more](#).
187
+ Three layers, each serving a different recall horizon.
260
188
 
261
- <details>
262
- <summary>View all skills</summary>
263
-
264
- | Tier | Count | How it works |
265
- | -------------------- | :---: | --------------------------------------------------------- |
266
- | **Active Skills** | 22 | Auto-injected into every AI prompt. Always available. |
267
- | **Reference Skills** | 94 | AI reads them on-demand when you ask for a relevant task. |
268
-
269
- #### Active Skills (always on)
270
-
271
- | Skill | What it does |
272
- | ------------------------------------------------------------------- | --------------------------------------------------------- |
273
- | `browser` | Chrome automation — snapshot, click, navigate, screenshot |
274
- | `github` | Issues, PRs, CI, code review via `gh` CLI |
275
- | `notion` | Create/manage Notion pages and databases |
276
- | `memory` | Persistent long-term memory across sessions |
277
- | `telegram-send` | Send photos, documents, voice messages to Telegram |
278
- | `vision-click` | Screenshot → AI finds coordinates → clicks (one command) |
279
- | `pdf` / `pdf-expert` / `docx` / `xlsx` / `pptx` / `hwp` | Read, create, edit office & PDF documents (incl. Korean HWP) |
280
- | `screen-capture` | macOS screenshot and camera capture |
281
- | `video` | Remotion-based programmatic video rendering from JSON |
282
- | `dev` / `dev-frontend` / `dev-backend` / `dev-data` / `dev-testing` | Development guidelines for sub-agents |
283
- | `dev-pabcd` / `dev-scaffolding` / `dev-code-reviewer` | Orchestration, scaffolding, and code review guides |
189
+ | Layer | What it stores | How it works |
190
+ |---|---|---|
191
+ | **History Block** | Recent session context | `buildHistoryBlock()` — last 10 sessions, max 8000 chars, scoped to working directory. Injected at prompt start |
192
+ | **Memory Flush** | Structured knowledge extracted from conversations | Triggered after threshold (default 10 turns). Extractor prompt summarizes into episodes, daily logs (`YYYY-MM-DD.md`), live notes. Stored as markdown files |
193
+ | **Soul + Task Snapshot** | Identity and semantic recall | `soul.md` defines core values, tone, boundaries. Task Snapshot searches FTS5 index for up to 4 semantically relevant hits (700 chars each) per prompt |
284
194
 
285
- #### Reference Skills (on-demand)
286
-
287
- 94 more skills ready to use — imagegen, openai-docs, spotify, weather, deep-research, tts, video-downloader, apple-reminders, 1password, terraform, postgres, jupyter-notebook, sentry, whatsapp, and more.
288
-
289
- ```bash
290
- jaw skill install <name> # Activate a reference skill permanently
291
- ```
195
+ All three layers feed into the system prompt automatically. Memory is searchable: `jaw memory search <query>` or `/memory <query>` from any interface.
292
196
 
293
- </details>
197
+ Advanced memory includes profile summary, bootstrap/migration, and reindex flows accessible from the Web UI settings.
294
198
 
295
199
  ---
296
200
 
297
- ## 📱 TelegramYour Assistant in Your Pocket
201
+ ## 🎭 OrchestrationPABCD
298
202
 
299
- Your assistant isn't tied to your desk. Chat from anywhere via Telegram:
203
+ For complex tasks, CLI-JAW uses a 5-phase state machine. You approve every transition.
300
204
 
301
205
  ```
302
- 📱 Telegram ←→ 🦈 CLI-JAW ←→ 🤖 AI Engines
206
+ P (Plan) A (Audit) B (Build) → C (Check) → D (Done) → IDLE
207
+ ⛔ ⛔ ⛔ auto auto
303
208
  ```
304
209
 
305
- <details>
306
- <summary>📋 Telegram setup (3 steps)</summary>
210
+ | Phase | What happens |
211
+ |---|---|
212
+ | **P** | Boss AI writes a diff-level plan. Stops for your review |
213
+ | **A** | Read-only worker verifies the plan is feasible |
214
+ | **B** | Boss implements. Read-only worker verifies the result |
215
+ | **C** | Type-check, docs update, consistency check |
216
+ | **D** | Summary of all changes. Returns to idle |
307
217
 
308
- 1. **Create a bot** Message [@BotFather](https://t.me/BotFather) `/newbot` copy the token
309
- 2. **Configure** — Run `jaw init --telegram-token YOUR_TOKEN` or edit settings in the Web UI
310
- 3. **Start chatting** — Send any message to your bot. Your chat ID is auto-saved on first message.
218
+ State is DB-persisted and survives server restarts. Workers cannot modify files. Activate with `jaw orchestrate` or `/pabcd`.
311
219
 
312
- </details>
220
+ ---
313
221
 
314
- **What you can do from Telegram:**
222
+ ## 📦 Skills
315
223
 
316
- - 💬 Chat with your assistant (any of 5 AI engines)
317
- - 🎤 Send voice messages (auto-transcribed via multi-provider STT)
318
- - 📎 Send files and photos for processing
319
- - 🎙️ Combine voice + text + attachments in a single message
320
- - ⚡ Run commands (`/cli`, `/model`, `/status`)
321
- - 🔄 Switch AI engines on the fly
224
+ 100+ skills, organized by what they do.
322
225
 
323
- **What your assistant sends back:**
226
+ | Category | Skills | What they cover |
227
+ |---|---|---|
228
+ | **Office** | `pdf`, `docx`, `xlsx`, `pptx`, `hwp` | Read, create, edit documents. Korean HWP/HWPX via OfficeCLI |
229
+ | **Automation** | `browser`, `vision-click`, `screen-capture`, `desktop-control` | Chrome CDP, AI-powered coordinate click, macOS screenshot/camera, Computer Use |
230
+ | **Media** | `video`, `imagegen`, `lecture-stt`, `tts` | Remotion video rendering, OpenAI image generation, lecture transcription, text-to-speech |
231
+ | **Integration** | `github`, `notion`, `telegram-send`, `memory` | Issues/PRs/CI, Notion pages, Telegram media delivery, persistent memory |
232
+ | **Visualization** | `diagram` | SVG diagrams, charts, interactive visualizations rendered in chat |
233
+ | **Dev guides** | `dev`, `dev-frontend`, `dev-backend`, `dev-data`, `dev-testing`, `dev-pabcd`, `dev-code-reviewer` | Engineering guidelines injected into sub-agent prompts |
324
234
 
325
- - AI responses with markdown formatting
326
- - Generated images, PDFs, documents
327
- - Scheduled task results (heartbeat jobs)
328
- - Browser screenshots
235
+ 22 active skills (always injected). 94+ reference skills (loaded on demand).
329
236
 
330
- <p align="center">
331
- <img src="docs/screenshots/telegram-bot.png" width="300" alt="Telegram Bot" />
332
- </p>
237
+ ```bash
238
+ jaw skill install <name> # activate a reference skill
239
+ ```
333
240
 
334
241
  ---
335
242
 
336
- ## 🎤 Voice & STT — Speech-to-Text
243
+ ## 🌐 Browser & desktop automation
337
244
 
338
- CLI-JAW supports voice input across all interfaces with multi-provider STT:
245
+ | Capability | How it works |
246
+ |---|---|
247
+ | **Chrome CDP** | Navigate, click, type, screenshot, evaluate JS, scroll, focus, press keys — 10 actions via DevTools Protocol |
248
+ | **Vision-click** | Screenshot the screen, AI extracts target coordinates, clicks. One command: `jaw browser vision-click "Login button"` |
249
+ | **DOM reference** | Documented selector maps for ChatGPT, Grok, and Gemini web UIs — model selection, stop buttons, tool drawers |
250
+ | **Computer Use** | Desktop app automation via Codex App Computer Use MCP. Routes DOM targets to CDP, desktop apps to Computer Use |
251
+ | **Diagram skill** | Generate SVG diagrams and interactive HTML visualizations, rendered in sandboxed iframes with copy/save controls |
339
252
 
340
- | Provider | How to enable |
341
- | --------------------- | --------------------------------------------- |
342
- | **OpenAI-compatible** | Settings UI → STT → OpenAI endpoint + API key |
343
- | **Google Vertex AI** | Settings UI → STT → Vertex AI credentials |
344
- | **Custom endpoint** | Any OpenAI-compatible STT API URL |
253
+ ---
345
254
 
346
- **Where you can use voice:**
255
+ ## 🔌 MCP
347
256
 
348
- - 🌐 **Web UI** Click the mic button to record and transcribe in real-time
349
- - 📱 **Telegram** — Send voice messages; auto-transcribed before reaching the AI
350
- - 🎙️ **Multimodal** — Combine voice + text + file attachments in a single message
257
+ [Model Context Protocol](https://modelcontextprotocol.io) lets AI agents use external tools. CLI-JAW manages MCP config for all five engines from one file.
351
258
 
352
- All STT settings (provider, API keys, language) are managed in the **Settings UI** — no config files to edit.
259
+ ```bash
260
+ jaw mcp install @anthropic/context7
261
+ # → syncs to Claude, Codex, Gemini, OpenCode, Copilot config files
262
+ ```
263
+
264
+ No more editing five different JSON files. Install once, all engines get it.
265
+
266
+ ```bash
267
+ jaw mcp sync # re-sync after manual edits
268
+ ```
353
269
 
354
270
  ---
355
271
 
356
- ## 🎭 Multi-Agent Orchestration — PABCD
272
+ ## 💬 Messaging
357
273
 
358
- For complex tasks, CLI-JAW uses **PABCD** — a finite state machine that enforces a strict 5-phase pipeline:
274
+ ### Telegram
359
275
 
360
276
  ```
361
- ┌─────────────────────────────────────────────────────────┐
362
- │ P A B C D │
363
- │ Plan → Audit → Build → Check → Done │
364
- │ 📝 🔍 🔨 ✅ 🏁 │
365
- │ ↑ ↑ │
366
- │ └── reject ──┘── reject (self-heal loop) │
367
- └─────────────────────────────────────────────────────────┘
277
+ 📱 Telegram ←→ 🦈 CLI-JAW ←→ 🤖 AI Engines
368
278
  ```
369
279
 
370
- | Phase | Name | What happens |
371
- | :---: | ----- | ----------------------------------------------------------------------------------------------------------- |
372
- | **P** | Plan | Boss AI writes a diff-level implementation plan. Stops and waits for your approval. |
373
- | **A** | Audit | A read-only worker verifies the plan is feasible — imports resolve, signatures match, no integration risks. |
374
- | **B** | Build | Boss implements the code directly. A read-only worker verifies the result. Self-heals on failure. |
375
- | **C** | Check | Final verification — `tsc --noEmit`, docs update, consistency check. |
376
- | **D** | Done | Summary of all changes. State returns to IDLE. |
377
-
378
- **Key design decisions:**
379
- - **DB-persisted FSM** — state survives server restarts, CLI and Web UI share the same state
380
- - **Hard STOP at every phase** — the AI cannot self-advance; you approve each transition
381
- - **Workers are READ-ONLY** — audit and verify phases can never accidentally modify files
382
- - **Parallel-safe** — independent subtasks run concurrently via `Promise.all` with file-overlap detection
383
-
384
- ```mermaid
385
- graph TD
386
- USER["👤 Your Request"] --> TRIAGE["🔍 Triage — Simple or Complex?"]
387
-
388
- TRIAGE -->|Simple| DIRECT["⚡ Direct Response"]
389
- TRIAGE -->|Complex| P["📝 P: Plan"]
390
-
391
- P -->|approved| A["🔍 A: Audit"]
392
- A -->|pass| B["🔨 B: Build"]
393
- A -->|fail| P
394
- B -->|verified| C["✅ C: Check"]
395
- B -->|needs fix| B
396
- C --> D["🏁 D: Done"]
397
- D --> IDLE["💤 IDLE"]
398
-
399
- style USER fill:#f5e6d3,stroke:#d4a574,stroke-width:2px,color:#5c4033
400
- style P fill:#fdf2e9,stroke:#d4a574,color:#5c4033
401
- style A fill:#fdf2e9,stroke:#d4a574,color:#5c4033
402
- style B fill:#f5e6d3,stroke:#d4a574,stroke-width:2px,color:#5c4033
403
- style C fill:#f5e6d3,stroke:#d4a574,stroke-width:2px,color:#5c4033
404
- style D fill:#f5e6d3,stroke:#d4a574,stroke-width:2px,color:#5c4033
405
- ```
280
+ <details>
281
+ <summary>Setup (3 steps)</summary>
406
282
 
407
- Activate manually with `jaw orchestrate` or let the assistant decide automatically. The Web UI shows a live roadmap bar with phase indicators and a 🦈 runner animation.
283
+ 1. Create a bot message [@BotFather](https://t.me/BotFather) `/newbot` copy the token
284
+ 2. Configure — `jaw init --telegram-token YOUR_TOKEN` or use the Web UI settings
285
+ 3. Send any message to your bot. Chat ID is auto-saved on first message
408
286
 
409
- ![Orchestration Log](docs/screenshots/orchestration-log.png)
287
+ </details>
410
288
 
411
- ---
289
+ What works from Telegram: text chat, voice messages (auto-transcribed via multi-provider STT), file/photo upload, slash commands (`/cli`, `/model`, `/status`), scheduled task result delivery.
412
290
 
413
- ## 🔌 MCP — One Config, Six AI Engines
291
+ ### Discord
414
292
 
415
- ```bash
416
- jaw mcp install @anthropic/context7 # Install once
417
- # → Automatically syncs to Claude, Codex, Gemini, OpenCode, Copilot, Antigravity
418
- ```
293
+ Same capabilities as Telegram — text, files, commands. Channel and thread routing with forwarder for agent result broadcast. Setup via Web UI settings.
419
294
 
420
- ```mermaid
421
- graph LR
422
- MJ["📄 mcp.json"] -->|auto-sync| CL["Claude"]
423
- MJ -->|auto-sync| CX["Codex"]
424
- MJ -->|auto-sync| GM["Gemini"]
425
- MJ -->|auto-sync| OC["OpenCode"]
426
- MJ -->|auto-sync| CP["Copilot"]
427
- MJ -->|auto-sync| AG["Antigravity"]
428
-
429
- style MJ fill:#f5e6d3,stroke:#d4a574,stroke-width:2px,color:#5c4033
430
- ```
295
+ ### Voice & STT
296
+
297
+ Voice input works on Web (mic button), Telegram (voice messages), and Discord. Providers: OpenAI-compatible, Google Vertex AI, or any custom endpoint. Configured in the Web UI settings.
431
298
 
432
- No more editing 5 different config files. Install once → all AI engines get it.
299
+ ---
300
+
301
+ ## ⏰ Scheduling & heartbeat
302
+
303
+ | Feature | What it does |
304
+ |---|---|
305
+ | **Heartbeat jobs** | Cron-scheduled tasks that run unattended. Results delivered to Telegram/Discord |
306
+ | **Service auto-start** | `jaw service install` — auto-detects systemd (Linux), launchd (macOS), or Docker |
307
+ | **Memory auto-reflect** | Optional post-flush reflection for structured knowledge extraction |
433
308
 
434
309
  ---
435
310
 
436
- ## ⌨️ CLI Commands
311
+ ## ⌨️ CLI commands
437
312
 
438
313
  ```bash
439
- jaw serve # Start server
440
- jaw service install # Auto-start on boot (systemd/launchd/docker auto-detected)
441
- jaw service status # Check daemon status
442
- jaw service unset # Remove auto-start
443
- jaw service logs # View service logs
444
- jaw chat # Terminal TUI
445
- jaw doctor # Diagnostics (12 checks)
446
- jaw skill install <name> # Install a skill
447
- jaw mcp install <package> # Install MCP → syncs to all 6 CLIs
448
- jaw memory search <query> # Search memory
449
- jaw browser start # Launch Chrome (CDP)
314
+ jaw serve # start server → http://localhost:3457
315
+ jaw chat # terminal TUI
316
+ jaw doctor # 12-point diagnostics
317
+ jaw service install # auto-start on boot
318
+ jaw skill install <name> # activate a skill
319
+ jaw mcp install <package> # install MCP → syncs to 5 engines
320
+ jaw memory search <query> # search memory
321
+ jaw browser start # launch Chrome (CDP)
450
322
  jaw browser vision-click "Login" # AI-powered click
451
- jaw clone ~/my-project # Clone instance for a separate project
452
- jaw --home ~/my-project serve --port 3458 # Run a second instance
453
- jaw reset # Full reset
323
+ jaw clone ~/project # clone instance
324
+ jaw --home ~/project serve --port 3458 # run second instance
325
+ jaw orchestrate # enter PABCD
326
+ jaw dispatch --agent Research --task "..." # dispatch employee
327
+ jaw reset # full reset
454
328
  ```
455
329
 
456
330
  ---
457
331
 
458
- ## 🏗️ Multi-Instance — Separate Projects, Separate Contexts
332
+ ## 🏗️ Multi-instance
459
333
 
460
- Run multiple isolated instances of CLI-JAW — each with its own settings, memory, skills, and database.
334
+ Run isolated instances with separate settings, memory, and database.
461
335
 
462
336
  ```bash
463
- # Clone your default instance to a new project
464
337
  jaw clone ~/my-project
465
-
466
- # Run it on a different port
467
338
  jaw --home ~/my-project serve --port 3458
468
-
469
- # Or auto-start both on boot
470
- jaw service # default → port 3457 (auto-detect backend)
471
- jaw --home ~/my-project service --port 3458 # project → port 3458
472
339
  ```
473
340
 
474
- Each instance is fully independent — different working directory, different memory, different MCP config. Perfect for separating work/personal contexts or per-project AI setups.
475
-
476
- | Flag / Env | What it does |
477
- | --------------------- | ----------------------------------------- |
478
- | `--home <path>` | Use a custom home directory for this run |
479
- | `--home=<path>` | Same, with `=` syntax |
480
- | `CLI_JAW_HOME=<path>` | Set via environment variable |
481
- | `jaw clone <target>` | Clone current instance to a new directory |
482
- | `--port <port>` | Custom port for `serve` / `service` |
483
-
484
- ---
485
-
486
- ## 🤖 Models
487
-
488
- Each CLI comes with preconfigured presets, but you can type **any model ID** directly.
489
-
490
- <details>
491
- <summary>View all presets</summary>
492
-
493
- | CLI | Default | Notable Models |
494
- | ------------ | -------------------------- | ----------------------------------------------- |
495
- | **Claude** | `claude-sonnet-4-6` | opus-4-6, haiku-4-5, extended thinking variants |
496
- | **Codex** | `gpt-5.3-codex` | spark, 5.2, 5.1-max, 5.1-mini |
497
- | **Gemini** | `gemini-2.5-pro` | 3.0-pro-preview, 3-flash-preview, 2.5-flash |
498
- | **OpenCode** | `claude-opus-4-6-thinking` | 🆓 big-pickle, GLM-5, MiniMax, Kimi, GPT-5-Nano |
499
- | **Copilot** | `gpt-4.1` 🆓 | 🆓 gpt-5-mini, claude-sonnet-4.6, opus-4.6 |
500
-
501
- </details>
502
-
503
- > 🔧 To add models: edit `src/cli/registry.ts` — one file, auto-propagates everywhere.
341
+ Each instance is fully independent — different working directory, different memory, different MCP config.
504
342
 
505
343
  ---
506
344
 
507
- ## 🐳 Docker — Container Isolation
508
-
509
- Run CLI-JAW in a Docker container for **security isolation** — AI agents cannot access host files.
345
+ ## 🐳 Docker
510
346
 
511
347
  ```bash
512
- # Quick start (after npm publish)
513
- docker compose up -d
514
- # → http://localhost:3457
515
-
516
- # Or build manually
517
- docker build -t cli-jaw .
518
- docker run -d -p 3457:3457 --env-file .env --name jaw cli-jaw
348
+ docker compose up -d # http://localhost:3457
519
349
  ```
520
350
 
521
- <details>
522
- <summary>📋 Docker details</summary>
523
-
524
- **Two Dockerfiles:**
351
+ Non-root `jaw` user, Chromium sandbox enabled. Two Dockerfiles: `Dockerfile` (npm install) and `Dockerfile.dev` (local source). Data persists in `jaw-data` named volume.
525
352
 
526
- | File | Purpose | Use Case |
527
- | ---------------- | -------------------------- | ----------------------- |
528
- | `Dockerfile` | Installs from npm registry | Production / deployment |
529
- | `Dockerfile.dev` | Builds from local source | Development / testing |
353
+ <details>
354
+ <summary>Docker details</summary>
530
355
 
531
356
  ```bash
532
- # Dev build (local source)
357
+ # Dev build
533
358
  docker build -f Dockerfile.dev -t cli-jaw:dev .
534
359
  docker run -d -p 3457:3457 --env-file .env cli-jaw:dev
535
360
 
536
- # Pin version for CI
361
+ # Pin version
537
362
  docker build --build-arg CLI_JAW_VERSION=1.0.1 -t cli-jaw:1.0.1 .
538
363
 
539
- # If Chromium sandbox fails in your environment
364
+ # If Chromium sandbox fails
540
365
  docker run -e CHROME_NO_SANDBOX=1 -p 3457:3457 cli-jaw
541
366
  ```
542
367
 
543
- **Security:**
368
+ </details>
369
+
370
+ ---
371
+
372
+ ## 📖 Documentation
544
373
 
545
- - Non-root `jaw` user Chromium sandbox enabled by default
546
- - No `ipc: host` or `seccomp=unconfined` — full container isolation
547
- - `--no-sandbox` only via explicit `CHROME_NO_SANDBOX=1` opt-in
548
- - Build-time feature guard prevents outdated image deployment
374
+ | Document | What it covers |
375
+ |---|---|
376
+ | [CHANGELOG.md](CHANGELOG.md) | Release log, including the v1.6.0 catch-up covering v1.2.0 through v1.5.1 |
377
+ | [ARCHITECTURE.md](docs/ARCHITECTURE.md) | System design, module graph, 95 API handlers across 94 endpoints |
378
+ | [TESTS.md](TESTS.md) | Test coverage, counts, and test plan |
379
+ | [memory-architecture.md](docs/memory-architecture.md) | 3-layer memory model, indexing, and runtime behavior |
380
+ | [env-vars.md](docs/env-vars.md) | Environment variable reference |
381
+ | [skill-router-plan.md](docs/skill-router-plan.md) | Skill routing architecture |
382
+ | [officecli-integration.md](docs/officecli-integration.md) | OfficeCLI setup for HWP/HWPX and Office documents |
383
+ | [devlog/structure/](devlog/structure/) | Internal architecture reference — prompt pipeline, agent spawn, frontend, server API, commands, Telegram, memory |
549
384
 
550
- **Volumes:** Data persists in `jaw-data` named volume (`/home/jaw/.cli-jaw`).
551
- To use existing host config: `-v ~/.cli-jaw:/home/jaw/.cli-jaw`
385
+ ---
552
386
 
553
- </details>
387
+ ## ⚖️ How it compares
388
+
389
+ | | CLI-JAW | Hermes Agent | Claude Code |
390
+ |---|---|---|---|
391
+ | **Model access** | OAuth subscriptions (Claude Max, ChatGPT Pro, Copilot, Gemini) + OpenCode wildcard | API keys (OpenRouter 200+, Nous Portal) | Anthropic only |
392
+ | **Cost model** | Monthly subscriptions you already pay for | Per-token API billing | Anthropic subscription |
393
+ | **Primary UI** | Web PWA + Mac app + TUI | TUI only | CLI + IDE plugins |
394
+ | **Messaging** | Telegram (voice) + Discord | Telegram/Discord/Slack/WhatsApp/Signal | None |
395
+ | **Memory** | 3-layer (History/Flush/Soul) + FTS5 | Self-improving learning loop + Honcho | File-based auto-memory |
396
+ | **Browser automation** | Chrome CDP + vision-click + DOM ref | Limited | Via MCP |
397
+ | **Orchestration** | PABCD 5-phase FSM | Subagent spawn | Task tool |
398
+ | **Execution** | Local + Docker | Local/Docker/SSH/Daytona/Modal/Singularity | Local |
399
+ | **Skills** | 100+ bundled | Self-creating + agentskills.io | User-configured |
400
+ | **i18n** | English, Korean, Chinese | English | English |
401
+
402
+ CLI-JAW descends from the OpenClaw harness architecture (hybrid search manager, fallback patterns, session indexing). If migrating from OpenClaw, the slash-command surface and memory model will be familiar.
554
403
 
555
404
  ---
556
405
 
557
406
  ## 🛠️ Development
558
407
 
559
408
  <details>
560
- <summary>Build, run, and project structure</summary>
409
+ <summary>Build and project structure</summary>
561
410
 
562
411
  ```bash
563
- # Build (TypeScript → JavaScript)
564
412
  npm run build # tsc → dist/
565
-
566
- # Run from source (development)
567
- npm run dev # tsx server.ts (hot-reload friendly)
568
- npx tsx bin/cli-jaw.ts serve # Run CLI directly from .ts
569
-
570
- # Run from build (production)
571
- node dist/bin/cli-jaw.js serve
413
+ npm run dev # tsx server.ts (hot-reload)
572
414
  ```
573
415
 
574
- **Project structure:**
575
-
576
416
  ```
577
417
  src/
578
- ├── agent/ # AI agent lifecycle & spawning
579
- ├── browser/ # Chrome CDP automation
580
- ├── cli/ # CLI registry & model presets
581
- ├── core/ # DB, config, logging
582
- ├── http/ # Express server & middleware
583
- ├── memory/ # Persistent memory system
584
- ├── orchestrator/ # Multi-agent orchestration pipeline
585
- ├── prompt/ # Prompt injection & AGENTS.md generation
586
- ├── routes/ # REST API endpoints (40+)
587
- ├── security/ # Input sanitization & guardrails
588
- └── telegram/ # Telegram bot integration
418
+ ├── agent/ # AI agent lifecycle, spawn, history block
419
+ ├── browser/ # Chrome CDP, vision-click, launch policy
420
+ ├── cli/ # CLI registry, slash commands, model presets
421
+ ├── core/ # DB, config, employees, logging
422
+ ├── discord/ # Discord bot, commands, file send
423
+ ├── http/ # Express server, middleware
424
+ ├── memory/ # 3-layer memory, FTS5 indexing, flush, soul
425
+ ├── messaging/ # Channel routing, session keys
426
+ ├── orchestrator/ # PABCD state machine, worker registry, dispatch
427
+ ├── prompt/ # Prompt assembly pipeline, templates
428
+ ├── routes/ # REST API (95 handlers, 94 endpoints)
429
+ ├── security/ # Input sanitization, path guards
430
+ └── telegram/ # Telegram bot, voice STT, forwarder
589
431
  ```
590
432
 
591
- > TypeScript with `strict: true`, `NodeNext` module resolution, targeting ES2022.
592
-
593
433
  </details>
594
434
 
595
435
  ---
596
436
 
597
437
  ## 🧪 Tests
598
438
 
599
- <details>
600
- <summary>See TESTS.md for current pass counts and inventory</summary>
601
-
602
439
  ```bash
603
- npm test
440
+ npm test # tsx --test (native Node.js test runner)
604
441
  ```
605
442
 
606
- All tests run via `tsx --test` (native Node.js test runner + TypeScript).
607
-
608
- </details>
609
-
610
- ---
611
-
612
-
613
-
614
- ## 📖 Documentation
615
-
616
- | Document | What's inside |
617
- | -------- | ------------- |
618
- | [CHANGELOG.md](CHANGELOG.md) | Long-form release log, including the `v1.6.0` catch-up notes covering `v1.2.0` → `v1.5.1` |
619
- | [ARCHITECTURE.md](docs/ARCHITECTURE.md) | System design, module graph, REST API (40+ endpoints) |
620
- | [TESTS.md](TESTS.md) | Test coverage, current counts, and test plan |
621
- | [memory-architecture.md](docs/memory-architecture.md) | Structured memory model, indexing, and runtime behavior |
443
+ See [TESTS.md](TESTS.md) for current inventory and pass counts.
622
444
 
623
445
  ---
624
446
 
@@ -627,83 +449,39 @@ All tests run via `tsx --test` (native Node.js test runner + TypeScript).
627
449
  <details>
628
450
  <summary>Common issues</summary>
629
451
 
630
- | Problem | Solution |
631
- | ---------------------------- | ------------------------------------------------------------------------------------------ |
632
- | `cli-jaw: command not found` | Run `npm install -g cli-jaw` again. Check `npm bin -g` is in your `$PATH`. |
633
- | `Error: node version` | Upgrade to Node.js 22:`nvm install 22` or download from [nodejs.org](https://nodejs.org) |
634
- | `NODE_MODULE_VERSION` mismatch | Run `npm run ensure:native` (auto-rebuild) or reinstall dependencies for the current Node version |
635
- | Agent timeout / no response | Run `jaw doctor` to check CLI auth. Re-authenticate with `claude auth` / `codex login`. |
636
- | `EADDRINUSE: port 3457` | Another instance is running. Stop it or use `jaw serve --port 3458`. |
637
- | Telegram bot not responding | Check token with `jaw doctor`. Ensure `jaw serve` is running. |
638
- | Telegram ✓✓ delayed | Normal Telegram server-side delivery ack can take a few minutes under load. Not a bug. |
639
- | Skills not loading | Run `jaw skill reset` then `jaw mcp sync`. |
640
- | Browser commands fail | Install Chrome/Chromium. Run `jaw browser start` first. |
452
+ | Problem | Solution |
453
+ |---|---|
454
+ | `cli-jaw: command not found` | `npm install -g cli-jaw` again. Check `npm bin -g` is in `$PATH` |
455
+ | Claude computer-use MCP fails | Reinstall Claude natively: `curl -fsSL https://claude.ai/install.sh \| bash` or run `claude install`, then re-run `jaw doctor` |
456
+ | `Error: node version` | Upgrade to Node.js 22+: `nvm install 22` |
457
+ | `NODE_MODULE_VERSION` mismatch | `npm run ensure:native` (auto-rebuild) |
458
+ | Agent timeout | `jaw doctor` to check CLI auth |
459
+ | `EADDRINUSE: port 3457` | Another instance running. Use `--port 3458` |
460
+ | Telegram not responding | Check token with `jaw doctor`. Ensure `jaw serve` is running |
461
+ | Skills not loading | `jaw skill reset` then `jaw mcp sync` |
462
+ | Browser commands fail | Install Chrome. Run `jaw browser start` first |
641
463
 
642
464
  </details>
643
465
 
644
466
  <details>
645
- <summary>🔄 Fresh start — clean reinstall for legacy / cli-claw users</summary>
646
-
647
- If you previously used **cli-claw** or an older version of cli-jaw and want a completely clean slate:
467
+ <summary>Fresh start — clean reinstall</summary>
648
468
 
649
469
  ```bash
650
- # ── 1. Uninstall ──
651
470
  npm uninstall -g cli-jaw
652
-
653
- # Verify removal
654
- which jaw && echo "⚠️ jaw still found" || echo "✅ jaw removed"
655
-
656
- # ── 2. Back up & remove data ──
657
- # Back up current data (just in case)
658
471
  [ -d ~/.cli-jaw ] && mv ~/.cli-jaw ~/.cli-jaw.bak.$(date +%s)
659
-
660
- # Remove work instances
661
- [ -d ~/.jaw-work ] && rm -rf ~/.jaw-work
662
-
663
- # ── 3. Remove launchd daemons (macOS) ──
664
- launchctl list | grep com.cli-jaw | awk '{print $3}' | \
665
- xargs -I{} launchctl bootout gui/$(id -u) system/{} 2>/dev/null
666
- rm -f ~/Library/LaunchAgents/com.cli-jaw.*
667
-
668
- # ── 4. Remove legacy artifacts ──
669
- rm -f ~/AGENTS.md ~/CLAUDE.md # postinstall symlinks
670
- # Do not remove shared harness paths (~/.agents, ~/.agent) unless you explicitly
671
- # created them for cli-jaw. Use: jaw doctor --repair-shared-paths
672
- rm -rf ~/.cli-claw # old cli-claw data
673
- rm -f ~/.copilot/mcp-config.json # MCP config synced by jaw
674
-
675
- # ── 5. Verify clean state ──
676
- echo "=== Clean State Check ==="
677
- which jaw; which cli-jaw # should be "not found"
678
- ls ~/.cli-jaw ~/.cli-claw 2>&1 # should be "No such file"
679
-
680
- # ── 6. Reinstall ──
681
472
  npm install -g cli-jaw
682
473
  jaw init
683
474
  jaw doctor
684
475
  ```
685
476
 
686
- > 💡 Your backup is at `~/.cli-jaw.bak.<timestamp>` — copy back `settings.json` or `jaw.db` if you want to restore previous config or conversation history.
687
-
688
477
  </details>
689
478
 
690
479
  <details>
691
- <summary>🧱 Native module mismatch (<code>better-sqlite3</code>)</summary>
692
-
693
- If you upgraded Node.js and see a `NODE_MODULE_VERSION` error, re-check and auto-rebuild native modules for the current runtime:
480
+ <summary>Native module mismatch (better-sqlite3)</summary>
694
481
 
695
482
  ```bash
696
483
  npm run ensure:native
697
- ```
698
-
699
- `npm test`, `npm run test:all`, `npm run test:integration`, `npm run test:smoke`, and `npm run build`
700
- now run this guard automatically before they start.
701
-
702
- If that still fails, reinstall dependencies under the active Node version:
703
-
704
- ```bash
705
- rm -rf node_modules package-lock.json
706
- npm install
484
+ # or: rm -rf node_modules package-lock.json && npm install
707
485
  ```
708
486
 
709
487
  </details>
@@ -712,22 +490,16 @@ npm install
712
490
 
713
491
  ## 🤝 Contributing
714
492
 
715
- Contributions are welcome! Here's how to get started:
493
+ 1. Fork and branch from `master`
494
+ 2. `npm run build && npm test`
495
+ 3. Submit a PR
716
496
 
717
- 1. Fork the repo and create your branch from `master`
718
- 2. Run `npm run build && npm test` to make sure everything works
719
- 3. Submit a PR — we'll review it promptly
720
-
721
- > 📋 Found a bug or have a feature idea? [Open an issue](https://github.com/lidge-jun/cli-jaw/issues)
497
+ Found a bug or have an idea? [Open an issue](https://github.com/lidge-jun/cli-jaw/issues)
722
498
 
723
499
  ---
724
500
 
725
501
  <div align="center">
726
502
 
727
- **⭐ If CLI-JAW helps you, give it a star — it means a lot!**
728
-
729
- Made with ❤️ by the CLI-JAW community
730
-
731
- [MIT License](LICENSE)
503
+ **[MIT License](LICENSE)**
732
504
 
733
505
  </div>