diff --git a/README.ja-JP.md b/README.ja-JP.md
index 937069f6..1d7cb2a0 100644
--- a/README.ja-JP.md
+++ b/README.ja-JP.md
@@ -1,434 +1,88 @@
-# 🐳 CodeWhale
+# CodeWhale
-> **このターミナルネイティブのコーディングエージェントは、DeepSeek V4 の 100 万トークンのコンテキストウィンドウとプレフィックスキャッシュ機能を中心に構築されています。`codewhale` ディスパッチャーと `codewhale-tui` ランタイムの Rust バイナリペアとして配布され、Node.js や Python のランタイムは不要です。MCP クライアント、サンドボックス、永続的なタスクキューも標準で同梱されています。**
+> DeepSeek V4 とオープンモデルのためのローカル Agent ハーネス。自己、権威、証拠のループを扱います。
-[English README](README.md)
-[简体中文 README](README.zh-CN.md)
-[Tiếng Việt README](README.vi.md)
+[English README](README.md) · [简体中文 README](README.zh-CN.md) · [Tiếng Việt README](README.vi.md)
+
+
+## 考え方
+
+多くのコーディング Agent は「もっと強く」から始めます。もっと多くのツール、もっと長いコンテキスト、もっと多い自動化。CodeWhale は責任から始めます。
+
+Agent がリポジトリを編集する前に、まず住所が必要です。このターミナル、このユーザー、このブランチ、このセッション。それが ego の層です。誇示ではなく、継続性。人格の仮面ではなく、責任が結びつく場所です。
+
+その次に法が必要です。実際の作業ディレクトリでは、現在のユーザー意図、リポジトリの指示、Shell 出力、古い記憶、前回の引き継ぎ、安全ポリシー、未完了の変更が同じターンで衝突します。CodeWhale の Constitution は、その衝突に順序を与えます。現在のユーザー要求は古い文脈より上、ライブの証拠は推測より上、検証は自信より上、人格は声だけを決めて行動は決めません。
+
+CodeWhale の本体は、モデルの外側にある順序づけの層です。誰が行動しているのか、どの法に従うのか、どんな証拠があるのか、次の人間や Agent がどう続けられるのかを扱います。
+
+## できること
+
+- ローカルファーストのターミナル TUI。
+- ファイル、Shell、Git、Web、MCP、RLM、サブ Agent の型付きツール。
+- 承認ゲート、サンドボックス、side-git スナップショット、`/restore` ロールバック。
+- 編集後の Language Server 診断フィードバック。
+- 並行サブ Agent、永続セッション、fork、relay 引き継ぎ、Runtime API。
+- DeepSeek V4 を第一級として扱いながら、OpenRouter、Xiaomi MiMo、NVIDIA NIM、Arcee、SiliconFlow、Fireworks、Novita、自前の SGLang/vLLM、Ollama なども明示的な provider として扱います。
+
+DeepSeek は第一級ですが、唯一の経路ではありません。provider、model、base URL、認証情報は別々の選択です。
## インストール
-`codewhale` は自己完結型の Rust リリースバイナリのペアとしてインストールされます。`codewhale` はディスパッチャーで、同じ場所にある `codewhale-tui` ランタイムを起動して対話セッションを実行します。npm と Docker は両方を自動でインストールします。Cargo や手動インストールでは、両方を同じディレクトリ(通常は `PATH` 上のディレクトリ)に置いてください。実行に Node.js や Python のランタイムは不要です。
-
```bash
-# 1. npm — すでに Node を使っているなら最も簡単。npm パッケージは
-# GitHub Releases から対応するビルド済みバイナリペアをダウンロードする
-# 薄いインストーラーであり、codewhale 本体に Node ランタイム依存を加えるものではありません。
-npm install -g codewhale
-
-# 2. Cargo — Node 不要。2 つの crate を両方インストールします。
-cargo install codewhale-cli --locked # `codewhale` (エントリーポイント)
-cargo install codewhale-tui --locked # `codewhale-tui` (TUI バイナリ)
-
-# 3. Homebrew — 旧インストールとの互換用です。
-# tap/formula はまだ旧 deepseek-tui 名を使っています。新規インストールでは、
-# formula が改名されるまで npm、Cargo、Docker、直接ダウンロードを優先してください。
-brew tap Hmbown/deepseek-tui
-brew install deepseek-tui
-
-# 4. 直接ダウンロード — GitHub Releases のプラットフォームアーカイブ。
-# https://github.com/Hmbown/CodeWhale/releases
-# アーカイブには codewhale と codewhale-tui とインストールスクリプトが含まれます。
-# 個別バイナリもスクリプト用に添付されています。手動ではペアを同じ場所に置いてください。
-
-# 5. Docker — ビルド済みリリースイメージ。
-docker volume create codewhale-home
-docker run --rm -it \
- -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
- -v codewhale-home:/home/codewhale/.codewhale \
- -v "$PWD:/workspace" \
- -w /workspace \
- ghcr.io/hmbown/codewhale:latest
-```
-
-> 中国本土では、`--registry=https://registry.npmmirror.com` を指定して npm 経由のダウンロードを高速化するか、下記の[Cargo ミラー](#中国--ミラーフレンドリーなインストール)を利用してください。
-
-既にインストール済みの場合は、インストール方法に合わせて更新してください:
-
-```bash
-codewhale update
-npm install -g codewhale@latest
-brew update && brew upgrade deepseek-tui # 旧 Homebrew インストールのみ
-cargo install codewhale-cli --locked --force
-cargo install codewhale-tui --locked --force
-```
-
-> codewhale update は --proxy をサポートしており、プロキシ経由で更新できます
-> 例: codewhale update --proxy https://localhost:7897
-
-[](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml)
-[](https://www.npmjs.com/package/codewhale)
-[](https://crates.io/crates/codewhale-cli)
-[](https://deepwiki.com/Hmbown/CodeWhale)
-
-
-
-
-
----
-
-## codewhale とは?
-
-モデルは質問に答えます。エージェントはタスクを完了します。その差がハーネス——モデルが迷走しないようにするルール、証拠、フィードバックのシステムです。
-
-CodeWhale はそのハーネスであり、DeepSeek V4 を中心に構築され、3つの原則に導かれています:
-
-| 原則 | 仕組み |
-|---|---|
-| **信頼から始める** | 毎ターン「A」で始まる——確実性より可能性、便利さより丁寧さ |
-| **明確な管轄権** | 9階層の権威を持つ成文憲法。ユーザーの意図が古い指示より優先。検証が自信より優先。 |
-| **再帰的改善** | V4 がハーネスの一部を書いた。ハーネスが改善されると V4 はより効果的になり、さらにハーネスを改善する。毎ターンがより強くなる。 |
-
-オープンソース、ターミナルネイティブ、`codewhale` / `codewhale-tui` の Rust バイナリペアとして提供されています。
-
-## ハーネスの仕組み
-
-エージェントモデルは大規模な相反する情報を扱います:ユーザーの意図、プロジェクトルール、システムデフォルト、ツール出力、古いメモリが単一ターンで権威を競い合います。LLM が裁判官として機能するには管轄権が必要です——衝突したとき、どの情報源が勝つのか?
-
-CodeWhale は**憲法**(`prompts/base.md`)でこれに答えます。これは形式化された法の階層です——第七条は憲法自体の条項から前セッションのハンドオフまで、9 つの情報源をランク付けします。ユーザーの現在のメッセージは古いプロジェクト指示より上。ライブのツール出力は仮定より上。検証は自信より上。モデルは毎ターン明確な権威チェーンを継承し、どの指示に従うべきか推測する必要がありません。
-
-7 つの条項が階層の上にあり、モデルのアイデンティティ、義務、エージェンシーを定義します:検証義務(第5条——すべての行動は証拠を残し、信念で成功を宣言しない)、協調の遺産(第6条——次の知性のためにワークスペースを可読に保つ)、真実優先条項(第2条——下位のルールで上書きできない)。
-
-DeepSeek V4 のプレフィックスキャッシュがこれを実用的にします。憲法は長く詳細ですが、一度キャッシュされるとコールドリードの約 100 分の 1 のコストになります。モデルはそれを再帰的に参照し——RLM セッションを通じて覗き、スキャンし、クエリし——単一の暗記パスに頼るのではなく、必要に応じて情報を再訪します。それは閉じた本のテストよりも、開いた本のテストのように機能します。
-
-権威構造が明示的であるため、失敗は隠されません。非ゼロの終了コード、ターン間に届く rust-analyzer からの型エラー、サンドボックス拒否——これらは修正ベクトルとしてフィードバックされます。モデルは自身のドリフトを使って自己修正します。
-
-3 つのモードが行動空間を制御します。Plan は読み取り専用。Agent は破壊的操作を承認ゲートの背後に置きます。YOLO は信頼済みワークスペースで自動承認します。macOS Seatbelt はアクティブなサンドボックス;Linux Landlock は検出されるが未適用;Windows サンドボックスは未公開。
-
-Fin——thinking off の安価な Flash 呼び出し——がターンごとにモデル自動ルーティングを処理します。`--model auto` がデフォルトです。
-
-毎ターン side-git スナップショットをリポジトリの `.git` 外に記録。`/restore` と `revert_turn` がワークスペースを即座にロールバックします。
-
-サブエージェントは並行実行(最大 20)。`agent_open` は即座に戻り;結果は完了センチネルとしてインラインで到着し、サマリー付き。完全なトランスクリプトは `agent_eval` を通じて境界付きハンドルに保持されます。[docs/SUBAGENTS.md](docs/SUBAGENTS.md) を参照。
-
-その他の機能面:編集ごとの LSP 診断(rust-analyzer、pyright、typescript-language-server、gopls、clangd)、バッチ分析用 RLM セッション、MCP プロトコル、HTTP/SSE ランタイム API、永続タスクキュー、Zed 向け ACP アダプター、SWE-bench エクスポート、キャッシュヒット/ミス内訳付きライブコスト追跡。
-
----
-
-## ハーネス
-
-`codewhale`(ディスパッチャー CLI)→ `codewhale-tui`(コンパニオンバイナリ)→ ratatui インターフェース ↔ 非同期エンジン ↔ OpenAI 互換のストリーミングクライアント。ツール呼び出しは型付きレジストリ(シェル、ファイル操作、Git、Web、サブエージェント、MCP、RLM)を経由してルーティングされ、結果はトランスクリプトへとストリーム返送されます。エンジンはセッション状態、ターン管理、永続タスクキューを管理し、LSP サブシステムは編集後の診断を次の推論ステップ前にモデルのコンテキストへ供給します。
-
-詳しくは [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) を参照してください。
-
----
-
-## クイックスタート
-
-```bash
-npm install -g codewhale
+cargo install codewhale-cli --locked
+cargo install codewhale-tui --locked
codewhale --version
codewhale --model auto
```
-ビルド済みバイナリペアとプラットフォームアーカイブは **Linux x64**、**Linux ARM64**(v0.8.8 以降)、**macOS x64**、**macOS ARM64**、**Windows x64** 向けに公開されています。その他のターゲット(musl、riscv64、FreeBSD など)は [ソースからのインストール](#install-from-source) または [docs/INSTALL.md](docs/INSTALL.md) を参照してください。
-
-初回起動時に [DeepSeek API キー](https://platform.deepseek.com/api_keys) の入力を求められます。キーは `~/.codewhale/config.toml`(旧 `~/.deepseek/config.toml` も互換性維持)に保存されるため、OS のクレデンシャルプロンプトなしに任意のディレクトリから利用できます。
-
-事前に設定することもできます:
+他の方法:
```bash
-codewhale auth set --provider deepseek # ~/.codewhale/config.toml に保存
+# GitHub Releases にプラットフォーム別アーカイブがあります:
+# https://github.com/Hmbown/CodeWhale/releases
-export DEEPSEEK_API_KEY="YOUR_KEY" # 環境変数による代替方法。非対話シェルでは ~/.zshenv を使用
+# GitHub に安定して到達できない場合は CNB mirror を使えます:
+cargo install --git https://cnb.cool/codewhale.net/codewhale --tag v0.8.54 codewhale-cli --locked --force
+cargo install --git https://cnb.cool/codewhale.net/codewhale --tag v0.8.54 codewhale-tui --locked --force
+
+# 旧 Homebrew 互換。formula はまだ deepseek-tui 名を使います。
+brew tap Hmbown/deepseek-tui
+brew install deepseek-tui
+```
+
+v0.8.54 の `codewhale` npm wrapper は、release asset 公開経路を固めるまで意図的に延期しています。このリリースでは Cargo、GitHub Releases、または CNB を使ってください。
+
+Docker、直接ダウンロード、中国ミラー、Windows/Scoop、Nix、チェックサム、トラブルシュートは [docs/INSTALL.md](docs/INSTALL.md) を見てください。
+
+## 最初の起動
+
+```bash
+codewhale auth set --provider deepseek
+codewhale auth status
+codewhale doctor
codewhale
-
-codewhale doctor # セットアップを検証
```
-> 保存済みキーをローテーション/削除するには: `codewhale auth clear --provider deepseek`。
+よく使う入口は `/provider`、`/model`、`/config`、`/statusline`、`/skills`、`/restore` です。入力の先頭に `!` を付けると、通常の承認とサンドボックス経路で Shell コマンドを実行できます。
-### Linux ARM64(Raspberry Pi、Asahi、Graviton、HarmonyOS PC)
+## 詳細ドキュメント
-`npm i -g codewhale` は v0.8.8 以降、glibc ベースの ARM64 Linux で動作します。[Releases ページ](https://github.com/Hmbown/CodeWhale/releases) からビルド済みバイナリをダウンロードし、`PATH` 上に並べて配置することもできます。
+README は考え方と最短経路だけを持ちます。詳細はドキュメントと [codewhale.net](https://codewhale.net/) にあります。
-HarmonyOS PC と OpenHarmony クロスビルドの設定は [docs/HarmonyOS.md](docs/HarmonyOS.md) を参照してください。
+- [User guide](docs/GUIDE.md)
+- [Install guide](docs/INSTALL.md)
+- [Configuration](docs/CONFIGURATION.md)
+- [Provider registry](docs/PROVIDERS.md)
+- [Sub-agents](docs/SUBAGENTS.md)
+- [Runtime API](docs/RUNTIME_API.md)
+- [Model Lab](docs/MODEL_LAB.md)
+- [Architecture](docs/ARCHITECTURE.md)
+- [v0.9.0 release acceptance](docs/V0_9_0_RELEASE_ACCEPTANCE.md)
-### 中国 / ミラーフレンドリーなインストール
+## v0.9.0 トラック
-中国本土から GitHub または npm のダウンロードが遅い場合は、Cargo レジストリのミラーを利用してください:
-
-```toml
-# ~/.cargo/config.toml
-[source.crates-io]
-replace-with = "tuna"
-
-[source.tuna]
-registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"
-```
-
-その後、両方のバイナリをインストールしてください(ディスパッチャーは実行時に TUI へ委譲します):
-
-```bash
-cargo install codewhale-cli --locked # `codewhale` を提供
-cargo install codewhale-tui --locked # `codewhale-tui` を提供
-codewhale --version
-```
-
-ビルド済みバイナリは [GitHub Releases](https://github.com/Hmbown/CodeWhale/releases) からもダウンロードできます。ミラーされたリリースアセットには `DEEPSEEK_TUI_RELEASE_BASE_URL` を使ってください。
-
-### Windows(Scoop)
-
-[Scoop](https://scoop.sh) は Windows のパッケージマネージャです。`codewhale`
-パッケージは Scoop main bucket にありますが、manifest は GitHub/npm/Cargo
-リリースより遅れることがあります。先に更新し、インストール後に
-`codewhale --version` で確認してください:
-
-```bash
-scoop update
-scoop install codewhale
-codewhale --version
-```
-
-
-
-ソースからのインストール
-
-任意の Tier-1 Rust ターゲット — musl、riscv64、FreeBSD、古い ARM64 ディストロを含む — で動作します。
-
-```bash
-# Linux のビルド依存関係 (Debian/Ubuntu/RHEL):
-# sudo apt-get install -y build-essential pkg-config libdbus-1-dev
-# sudo dnf install -y gcc make pkgconf-pkg-config dbus-devel
-
-git clone https://github.com/Hmbown/CodeWhale.git
-cd CodeWhale
-
-cargo install --path crates/cli --locked # Rust 1.88+ が必要。`codewhale` を提供
-cargo install --path crates/tui --locked # `codewhale-tui` を提供
-```
-
-両方のバイナリが必要です。クロスコンパイルとプラットフォーム固有の注意事項: [docs/INSTALL.md](docs/INSTALL.md)。
-
-
-
-### その他の API プロバイダー
-
-```bash
-# NVIDIA NIM
-codewhale auth set --provider nvidia-nim --api-key "YOUR_NVIDIA_API_KEY"
-codewhale --provider nvidia-nim
-
-# AtlasCloud
-codewhale auth set --provider atlascloud --api-key "YOUR_ATLASCLOUD_API_KEY"
-codewhale --provider atlascloud
-
-# Wanjie Ark
-codewhale auth set --provider wanjie-ark --api-key "YOUR_WANJIE_API_KEY"
-codewhale --provider wanjie-ark --model deepseek-reasoner
-
-# OpenRouter
-codewhale auth set --provider openrouter --api-key "YOUR_OPENROUTER_API_KEY"
-codewhale --provider openrouter --model deepseek/deepseek-v4-pro
-codewhale --provider openrouter --model arcee-ai/trinity-large-thinking
-codewhale --provider openrouter --model qwen/qwen3.7-max
-
-# Xiaomi MiMo
-codewhale auth set --provider xiaomi-mimo --api-key "YOUR_XIAOMI_MIMO_API_KEY"
-codewhale --provider xiaomi-mimo --model mimo-v2.5-pro
-
-# Novita
-codewhale auth set --provider novita --api-key "YOUR_NOVITA_API_KEY"
-codewhale --provider novita --model deepseek/deepseek-v4-pro
-
-# Fireworks
-codewhale auth set --provider fireworks --api-key "YOUR_FIREWORKS_API_KEY"
-codewhale --provider fireworks --model deepseek-v4-pro
-
-# 汎用 OpenAI 互換エンドポイント
-codewhale auth set --provider openai --api-key "YOUR_OPENAI_COMPATIBLE_API_KEY"
-OPENAI_BASE_URL="https://openai-compatible.example/v4" codewhale --provider openai --model glm-5
-
-# セルフホスト SGLang
-SGLANG_BASE_URL="http://localhost:30000/v1" codewhale --provider sglang --model deepseek-v4-flash
-
-# セルフホスト vLLM
-VLLM_BASE_URL="http://localhost:8000/v1" codewhale --provider vllm --model deepseek-v4-flash
-
-# セルフホスト Ollama
-ollama pull codewhale-coder:1.3b
-codewhale --provider ollama --model codewhale-coder:1.3b
-
-# Hugging Face Inference Providers
-codewhale auth set --provider huggingface --api-key "YOUR_HF_TOKEN"
-codewhale --provider huggingface --model deepseek-ai/DeepSeek-V4-Pro
-```
-
-TUI 内では `/provider` でプロバイダーピッカー、`/model` でローカルのモデル/思考モードピッカーを開けます。`/provider openrouter` や `/model ` で直接切り替え、`/models` で対応プロバイダーのライブモデル一覧を明示的に取得できます。
-
----
-
-## リリースノート
-
-バージョンごとの変更点は [CHANGELOG.md](CHANGELOG.md) にまとめています。この README は、現在のインストール方法、主要ワークフロー、プロバイダー設定、ランタイムインターフェース、拡張ポイントに絞っています。
-
----
-
-## 使い方
-
-```bash
-codewhale # インタラクティブ TUI
-codewhale "explain this function" # ワンショットプロンプト
-codewhale exec --auto --output-format stream-json "fix this bug" # NDJSON バックエンドストリーム
-codewhale exec --resume "follow up" # 非対話セッションを継続
-codewhale --model deepseek-v4-flash "summarize" # モデルの上書き
-codewhale --model auto "fix this bug" # モデルと推論強度を自動選択
-codewhale --yolo # ツールを自動承認
-codewhale auth set --provider deepseek # API キーの保存
-codewhale doctor # セットアップと接続性のチェック
-codewhale doctor --json # 機械可読の診断
-codewhale setup --status # 読み取り専用のセットアップ状態
-codewhale setup --tools --plugins # ツール/プラグインディレクトリの雛形作成
-codewhale models # ライブ API モデル一覧
-codewhale sessions # 保存済みセッション一覧
-codewhale resume --last # 最新セッションを再開
-codewhale resume # UUID 指定で特定セッションを再開
-codewhale fork # 保存済みセッションを兄弟パスに fork
-codewhale serve --http # HTTP/SSE API サーバー
-codewhale serve --acp # Zed/カスタムエージェント向け ACP stdio アダプター
-codewhale run pr # PR を取得しレビュープロンプトに先行投入
-codewhale mcp list # 設定された MCP サーバー一覧
-codewhale mcp validate # MCP の設定/接続性を検証
-codewhale mcp-server # ディスパッチャー MCP stdio サーバーを実行
-codewhale update # バイナリ更新の確認と適用
-```
-
-### キーボードショートカット
-
-| キー | 動作 |
-|---|---|
-| `Tab` | `/` または `@` のエントリ補完。実行中はドラフトをフォローアップとしてキューに追加。それ以外はモード切替 |
-| `Shift+Tab` | 推論努力の切替: off → high → max |
-| `F1` | 検索可能なヘルプオーバーレイ |
-| `Esc` | 戻る/閉じる |
-| `Ctrl+K` | コマンドパレット |
-| `Ctrl+R` | 以前のセッションを再開 |
-| `Alt+R` | プロンプト履歴を検索し、消去したドラフトを復元 |
-| `Ctrl+S` | 現在のドラフトを退避(`/stash list`、`/stash pop` で復元) |
-| `@path` | コンポーザーにファイル/ディレクトリのコンテキストを添付 |
-| `↑`(コンポーザー先頭で) | 添付ファイル行を選択して削除 |
-| `Alt+↑` | キュー済みの最後のメッセージを編集 |
-
-ショートカット完全版: [docs/KEYBINDINGS.md](docs/KEYBINDINGS.md)。
-
----
-
-## モード
-
-| モード | 動作 |
-| --- | --- |
-| **Plan** 🔍 | 読み取り専用の調査 — 変更を加える前に、モデルが探索して計画を提案(`update_plan` + `checklist_write`) |
-| **Agent** 🤖 | デフォルトのインタラクティブモード — 承認ゲート付きのマルチステップなツール利用。モデルは `checklist_write` で作業を概説 |
-| **YOLO** ⚡ | 信頼できるワークスペースですべてのツールを自動承認。可視性のための計画とチェックリストは引き続き維持 |
-
----
-
-## 設定
-
-ユーザー設定: `~/.codewhale/config.toml`(旧 `~/.deepseek/config.toml` も互換性維持)。プロジェクトオーバーレイ: `/.codewhale/config.toml`(旧 `/.deepseek/config.toml`)(拒否される項目: `api_key`、`base_url`、`provider`、`mcp_config_path`)。すべてのオプションは [config.example.toml](config.example.toml) にあります。
-
-主な環境変数:
-
-| 変数 | 用途 |
-|---|---|
-| `DEEPSEEK_API_KEY` | API キー |
-| `DEEPSEEK_BASE_URL` | API ベース URL |
-| `DEEPSEEK_HTTP_HEADERS` | 任意のモデルリクエストヘッダー |
-| `DEEPSEEK_MODEL` | デフォルトモデル |
-| `DEEPSEEK_STREAM_IDLE_TIMEOUT_SECS` | ストリームのアイドルタイムアウト秒数 |
-| `CODEWHALE_PROVIDER` / `DEEPSEEK_PROVIDER` | `deepseek`(デフォルト)、`nvidia-nim`、`openai`、`atlascloud`、`wanjie-ark`、`volcengine`、`openrouter`、`xiaomi-mimo`、`novita`、`fireworks`、`siliconflow`、`moonshot`、`sglang`、`vllm`、`ollama`、`huggingface` |
-| `DEEPSEEK_PROFILE` | 設定プロファイル名 |
-| `DEEPSEEK_MEMORY` | `on` に設定するとユーザーメモリを有効化 |
-| `DEEPSEEK_ALLOW_INSECURE_HTTP=1` | 信頼できるネットワークで非ローカル `http://` API ベース URL を許可 |
-| `NVIDIA_API_KEY` / `OPENAI_API_KEY` / `ATLASCLOUD_API_KEY` / `WANJIE_ARK_API_KEY` / `VOLCENGINE_API_KEY` / `ARK_API_KEY` / `OPENROUTER_API_KEY` / `XIAOMI_MIMO_API_KEY` / `MIMO_API_KEY` / `NOVITA_API_KEY` / `FIREWORKS_API_KEY` / `SILICONFLOW_API_KEY` / `MOONSHOT_API_KEY` / `KIMI_API_KEY` / `SGLANG_API_KEY` / `VLLM_API_KEY` / `OLLAMA_API_KEY` | プロバイダー認証 |
-| `OPENAI_BASE_URL` / `OPENAI_MODEL` | 汎用 OpenAI 互換エンドポイントとモデル ID |
-| `ATLASCLOUD_BASE_URL` / `ATLASCLOUD_MODEL` | AtlasCloud エンドポイントとモデル上書き |
-| `WANJIE_ARK_BASE_URL` / `WANJIE_ARK_MODEL` | Wanjie Ark エンドポイントとモデル上書き |
-| `VOLCENGINE_BASE_URL` / `ARK_BASE_URL` / `VOLCENGINE_MODEL` / `ARK_MODEL` | Volcengine Ark エンドポイントとモデル上書き |
-| `OPENROUTER_BASE_URL` | OpenRouter エンドポイント上書き |
-| `XIAOMI_MIMO_BASE_URL` / `MIMO_BASE_URL` / `XIAOMI_MIMO_MODEL` / `MIMO_MODEL` | Xiaomi MiMo エンドポイントとモデル上書き |
-| `NOVITA_BASE_URL` | Novita エンドポイント上書き |
-| `FIREWORKS_BASE_URL` | Fireworks エンドポイント上書き |
-| `SILICONFLOW_BASE_URL` / `SILICONFLOW_MODEL` | SiliconFlow エンドポイントとモデル上書き |
-| `MOONSHOT_BASE_URL` / `MOONSHOT_MODEL` / `KIMI_BASE_URL` / `KIMI_MODEL` | Moonshot/Kimi エンドポイントとモデル上書き |
-| `SGLANG_BASE_URL` | セルフホスト SGLang のエンドポイント |
-| `SGLANG_MODEL` | セルフホスト SGLang のモデル ID |
-| `VLLM_BASE_URL` | セルフホスト vLLM のエンドポイント |
-| `VLLM_MODEL` | セルフホスト vLLM のモデル ID |
-| `OLLAMA_BASE_URL` | セルフホスト Ollama のエンドポイント |
-| `OLLAMA_MODEL` | セルフホスト Ollama のモデルタグ |
-| `HUGGINGFACE_API_KEY` / `HF_TOKEN` | Hugging Face 認証 |
-| `HUGGINGFACE_BASE_URL` / `HUGGINGFACE_MODEL` | Hugging Face エンドポイントとモデル上書き |
-| `NO_ANIMATIONS=1` | 起動時にアクセシビリティモードを強制 |
-| `SSL_CERT_FILE` | 企業プロキシ向けのカスタム CA バンドル |
-
-UI のロケールはモデルの言語とは別です。`settings.toml` で `locale` を設定するか、`/config locale zh-Hans` を使うか、`LC_ALL`/`LANG` に依存させてください。詳しくは [docs/CONFIGURATION.md](docs/CONFIGURATION.md) と [docs/MCP.md](docs/MCP.md) を参照してください。
-
----
-
-## モデルと料金
-
-| モデル | コンテキスト | 入力(キャッシュヒット) | 入力(キャッシュミス) | 出力 |
-|---|---|---|---|---|
-| `deepseek-v4-pro` | 1M | $0.003625 / 1M | $0.435 / 1M | $0.87 / 1M |
-| `deepseek-v4-flash` | 1M | $0.0028 / 1M | $0.14 / 1M | $0.28 / 1M |
-
-レガシーエイリアス `deepseek-chat` / `deepseek-reasoner` は `deepseek-v4-flash` にマップされます。NVIDIA NIM のバリアントはあなたの NVIDIA アカウント条件に従います。
-
-> [!Note]
-> 上記の V4 Pro レートは恒久的な料金になりました。DeepSeek は、2026 年 5 月 31 日 15:59 UTC に 75% 期間限定割引が終了するタイミングで、元の料金を 4 分の 1 に正式に調整しました。TUI のコスト見積もりはすでにこれらの値を使用しているため、コード上の変更は不要です。今後の価格変更については、公式の [DeepSeek 価格ページ](https://api-docs.deepseek.com/zh-cn/quick_start/pricing) を参照してください。
-
----
-
-## 自分のスキルを公開する
-
-codewhale はワークスペースのディレクトリ(`.agents/skills` → `skills` → `.opencode/skills` → `.claude/skills`)とグローバルな `~/.codewhale/skills`(旧 `~/.deepseek/skills` も互換性維持)からスキルを発見します。各スキルは `SKILL.md` ファイルを持つディレクトリです:
-
-```text
-~/.codewhale/skills/my-skill/
-└── SKILL.md
-```
-
-必要なフロントマター:
-
-```markdown
----
-name: my-skill
-description: DeepSeek にカスタムワークフローを実行させたいときに利用する。
----
-
-# My Skill
-ここにエージェント向けの指示を記述します。
-```
-
-コマンド: `/skills`(一覧)、`/skill `(有効化)、`/skill new`(雛形)、`/skill install github:/`(コミュニティ)、`/skill update` / `uninstall` / `trust`。GitHub からのコミュニティインストールにバックエンドサービスは不要です。インストール済みのスキルはモデルに見えるセッションコンテキストに表示され、タスクが説明文にマッチした場合はエージェントが `load_skill` ツールを通じて関連スキルを自動選択できます。
-
----
-
-## ドキュメント
-
-| ドキュメント | トピック |
-|---|---|
-| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | コードベース内部 |
-| [CONFIGURATION.md](docs/CONFIGURATION.md) | 設定の完全リファレンス |
-| [MODES.md](docs/MODES.md) | Plan / Agent / YOLO モード |
-| [MCP.md](docs/MCP.md) | Model Context Protocol 統合 |
-| [RUNTIME_API.md](docs/RUNTIME_API.md) | HTTP/SSE API サーバー |
-| [INSTALL.md](docs/INSTALL.md) | プラットフォーム別インストールガイド |
-| [DOCKER.md](docs/DOCKER.md) | GHCR イメージ、ボリューム、Docker 利用方法 |
-| [CNB_MIRROR.md](docs/CNB_MIRROR.md) | CNB ミラーと中国向けインストールメモ |
-| [TENCENT_CLOUD_REMOTE_FIRST.md](docs/TENCENT_CLOUD_REMOTE_FIRST.md) | Tencent/CNB/Lighthouse/Feishu のリモート優先パス |
-| [TENCENT_LIGHTHOUSE_HK.md](docs/TENCENT_LIGHTHOUSE_HK.md) | Tencent Lighthouse 香港インスタンス設定 |
-| [MEMORY.md](docs/MEMORY.md) | ユーザーメモリ機能ガイド |
-| [SUBAGENTS.md](docs/SUBAGENTS.md) | サブエージェントの役割分類とライフサイクル |
-| [KEYBINDINGS.md](docs/KEYBINDINGS.md) | ショートカット完全カタログ |
-| [RELEASE_RUNBOOK.md](docs/RELEASE_RUNBOOK.md) | リリースプロセス |
-| [OPERATIONS_RUNBOOK.md](docs/OPERATIONS_RUNBOOK.md) | 運用とリカバリ |
-
-完全な変更履歴: [CHANGELOG.md](CHANGELOG.md)。
-
----
+v0.9.0 はまだ統合トラックです。tag、GitHub Release、npm、Cargo、リリース成果物が実際に作成され検証されるまで、公開済みリリースとは呼びません。現在の焦点は relay / 引き継ぎ、転写の落ち着き、コマンドと provider アーキテクチャ、VS Code / GUI Runtime API、HarnessProfile、WhaleFlow、そして貢献者 credit hygiene です。
## 謝辞
diff --git a/README.md b/README.md
index 3f06b3b2..e196be64 100644
--- a/README.md
+++ b/README.md
@@ -1,620 +1,156 @@
# CodeWhale
-> DeepSeek-first terminal coding agent with a durable harness: approval-gated
-> local edits, sub-agents, provider/model routing, live verification, rollback,
-> relay/continuity handoffs, and a v0.9 track for typed WhaleFlow workflows.
+> Local-first agent harness for DeepSeek V4 and open models: operating identity,
+> nested authority, and a local evidence loop.
-[简体中文 README](README.zh-CN.md)
-[日本語 README](README.ja-JP.md)
-[Tiếng Việt README](README.vi.md)
+[简体中文 README](README.zh-CN.md) · [日本語 README](README.ja-JP.md) · [Tiếng Việt README](README.vi.md)
[](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml)
-[](https://www.npmjs.com/package/codewhale)
[](https://crates.io/crates/codewhale-cli)
[DeepWiki project index](https://deepwiki.com/Hmbown/CodeWhale)

-## What CodeWhale Does
+## The Idea
-CodeWhale is a terminal-native coding harness for agentic model work. It gives
-the model a durable prompt constitution, a typed tool surface, approval gates,
-side-git rollback, LSP feedback after edits, cost/cache telemetry, and
-concurrent sub-agents that can investigate or implement without blocking the
-parent turn.
+Most coding agents start by adding power: more tools, more context, more
+autonomy. CodeWhale starts by assigning responsibility.
-It is DeepSeek-first, not DeepSeek-only. The default path targets DeepSeek V4,
-while provider routes such as OpenRouter, NVIDIA NIM, Arcee, Xiaomi MiMo,
-SiliconFlow, Fireworks, OpenAI-compatible gateways, self-hosted SGLang/vLLM, and
-Hugging Face stay explicit. Provider, model, base URL, and credentials are
-separate choices so direct-provider APIs do not get blurred with OpenRouter
-aliases.
+Before an agent edits a repo, it should have an address: this terminal, this
+user, this branch, this session. That is the ego layer. Not swagger; continuity.
+Not a persona mask; the place where responsibility attaches.
-The product goal is practical continuity. A long CodeWhale task should survive
-model routing, compaction, shell noise, branch experiments, contributor review,
-and a fresh maintainer session without losing the reason the work started or
-who helped move it forward.
+Then it needs law. A real workspace is a conflict stack: current user intent,
+repo instructions, shell output, stale memory, previous handoffs, safety policy,
+and half-finished work all compete inside the same turn. CodeWhale gives those
+sources an order through the CodeWhale Constitution:
-## Active v0.9 Track
+- **Ego is addressable.** The agent is an instance in this terminal and this
+ workspace, not a model card or leaderboard score.
+- **Evidence outranks narration.** Tool output beats a guess. A failed command
+ is reported as a failed command. Verification is part of the task.
+- **User intent stays sovereign.** The current request outranks stale repo
+ guidance, memory, previous handoffs, and personality overlays.
+- **Local law is explicit.** Repositories can add `.codewhale/constitution.json`
+ for durable project authority, protected invariants, branch policy, and
+ verification rules.
+- **Runtime policy is enforced.** Modes, approval gates, sandboxing, rollback,
+ and tool schemas are code, not advice the model has to remember.
-v0.9.0 is not released yet. The current branch is a stewardship lane for making
-long-running CodeWhale work easier to continue, review, and hand off without
-turning the README into release notes.
+The product is the ordering layer around the model: who is acting, whose law
+applies, what evidence exists, and how the next human or agent can continue.
-The v0.9 track keeps the same DeepSeek-first harness and adds work in these
-areas:
+## What Ships
-| Track | What is changing |
-| --- | --- |
-| Relay and continuity | `/relay`, fork-state handoff, and rich PlanArtifact context preserve the goal, why it matters, evidence, constraints, blockers, changed files, verification state, and the next action. |
-| Transcript calmness | Dense read/search/list-style tool runs can collapse into expandable groups, while failures, running work, shell commands, writes, diffs, plans, and reviews stay visible. |
-| Runtime sessions and workspaces | Branch work extends session/thread runtime APIs, including workspace-aware thread updates, completed-thread session saves, and safer guards around active turns. Treat this as v0.9-track capability until the release ships. |
-| Sub-agent recovery | Live per-step timeout recovery can preserve checkpoint metadata and let `agent_eval { continue: true }` resume an interrupted child in the same runtime. Cold-restart continuation is still a follow-up; persisted child tasks are not rehydrated yet. |
-| Project context stability | Bounded project-context packs and generated instructions keep large/noisy repositories from turning the first turn into an unbounded filesystem walk. |
-| HarmonyOS / OHOS | The lane carries safe OpenHarmony setup, OHOS platform guards, self-update disablement on OHOS, and target gating for PTY and Starlark execpolicy paths. Full OHOS target builds still require a host with the OpenHarmony native SDK configured. |
-| Nix and Starlark compatibility | Dependency stewardship keeps OHOS builds from pulling incompatible Nix-chain crates through PTY or Starlark paths where those features are gated. |
-| HarnessProfile | The branch carries the typed `HarnessPosture` / `HarnessProfile` config data model, strict schema validation, and a documented [profile cutline](docs/HARNESS_PROFILE_CUTLINE.md). Provider/model posture resolution, prompt/tool/runtime behavior, telemetry, and status display remain follow-up work. |
-| Contributor stewardship | Harvested PRs stay credited, contributor identity mapping is machine-readable, and community gates remain dry-run and human-toned while the branch is reviewed. |
-| WhaleFlow | Typed branch/leaf workflows, deterministic replay, pod-style workflow monitoring, provider/model posture, and evidence-backed profile evolution remain the larger v0.9 workbench goal. |
+CodeWhale turns that thesis into plain runtime surfaces:
-The current release acceptance matrix lives in
-[docs/V0_9_0_RELEASE_ACCEPTANCE.md](docs/V0_9_0_RELEASE_ACCEPTANCE.md), with
-the HarnessProfile runtime boundary documented in
-[docs/HARNESS_PROFILE_CUTLINE.md](docs/HARNESS_PROFILE_CUTLINE.md).
+- approval-gated file, shell, git, web, MCP, RLM, and sub-agent tools;
+- side-git snapshots and `/restore` rollback outside your repo's `.git`;
+- live diagnostics after edits from language servers where available;
+- concurrent sub-agents for parallel investigation and implementation;
+- durable sessions, forks, relay handoffs, and runtime APIs for editor/GUI work;
+- explicit provider/model routing with DeepSeek V4 first-class and other
+ OpenAI-compatible routes kept separate.
-## Release Status
-
-The latest published release line is still separate from the v0.9 integration
-branch. v0.9.0 work in this README describes the current integration track, not
-a published release artifact. Release-specific detail belongs in
-[CHANGELOG.md](CHANGELOG.md); this README summarizes the current user-facing
-surface and links to deeper docs.
-
-Release channels can lag each other. Before making release claims, verify the
-intended surface directly: GitHub Releases and checksums, npm `codewhale`,
-Cargo crates, Docker/GHCR images, CNB mirrors, and any legacy Homebrew formula.
-No tag, GitHub Release, npm/Cargo publish, Docker publish, or release artifact
-push should happen without explicit maintainer approval.
-
-## Quickstart
-
-```bash
-npm install -g codewhale
-codewhale --version
-codewhale --model auto
-```
-
-On first launch, CodeWhale prompts for a DeepSeek API key and saves it to
-`~/.codewhale/config.toml`; the legacy `~/.deepseek/config.toml` path is still
-read for compatibility. You can also set credentials directly:
-
-```bash
-codewhale auth set --provider deepseek
-codewhale auth status
-codewhale doctor
-```
-
-Use `/provider`, `/model`, `/config`, `/statusline`, `/skills`, and `/restore`
-inside the TUI. Prefix a composer line with `!` to run a shell command through
-the normal approval and sandbox path, for example `! cargo test -p codewhale-tui`.
+DeepSeek is first-class, not exclusive. CodeWhale also carries provider paths for
+OpenRouter, NVIDIA NIM, Xiaomi MiMo, Arcee, SiliconFlow, Fireworks, Novita,
+OpenAI-compatible gateways, self-hosted SGLang/vLLM, Ollama, and Hugging Face
+surfaces as they land.
## Install
-`codewhale` installs as a matched pair of self-contained Rust release binaries:
-the `codewhale` dispatcher command and the sibling `codewhale-tui` runtime it
-launches for interactive sessions. npm and Docker install both for you; Cargo
-and manual installs must put both binaries in the same directory
-(normally a directory on your `PATH`). The npm package is only an
-installer/wrapper for those release binaries; the agent does not run on Node.
-
-```bash
-# 1. npm — easiest if you already use Node. The package downloads the
-# matching prebuilt Rust binaries from GitHub Releases.
-npm install -g codewhale
-
-# 2. Cargo — no Node needed. Requires Rust 1.88+ (the crates use the
-# 2024 edition; older toolchains fail with "feature `edition2024` is
-# required"). Run `rustup update` first, or use a non-Cargo path below.
-cargo install codewhale-cli --locked # `codewhale` (entry point)
-cargo install codewhale-tui --locked # `codewhale-tui` (TUI binary)
-
-# 3. Homebrew — legacy compatibility only.
-# The tap/formula still uses the old deepseek-tui name. Prefer npm, Cargo,
-# Docker, or direct downloads for new installs until the formula is renamed.
-brew tap Hmbown/deepseek-tui
-brew install deepseek-tui
-
-# 4. Direct download — platform archive from GitHub Releases.
-# https://github.com/Hmbown/CodeWhale/releases
-# Archives include both codewhale and codewhale-tui plus an install script.
-# Individual binaries are also attached for scripts; keep the pair together.
-
-# 5. Docker — prebuilt release image.
-docker volume create codewhale-home
-docker run --rm -it \
- -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
- -v codewhale-home:/home/codewhale/.codewhale \
- -v "$PWD:/workspace" \
- -w /workspace \
- ghcr.io/hmbown/codewhale:latest
-```
-
-> In mainland China, speed up the npm path with
-> `--registry=https://registry.npmmirror.com`, or use the
-> [Cargo mirror](#china--mirror-friendly-installation) below.
->
-> Download safety: official release binaries live under
-> `https://github.com/Hmbown/CodeWhale/releases`. For manual downloads,
-> verify the SHA-256 manifest and avoid look-alike repositories or search-result
-> mirrors. See [download safety and checksums](docs/INSTALL.md#2-download-safety-and-checksums).
-
-Already installed? Use the updater that matches the install path:
-
-```bash
-codewhale update # release-binary updater
-npm install -g codewhale@latest # npm wrapper
-brew update && brew upgrade deepseek-tui # legacy Homebrew installs only
-cargo install codewhale-cli --locked --force
-cargo install codewhale-tui --locked --force
-```
-
-`codewhale update --proxy https://localhost:7897` routes update checks and
-downloads through a proxy.
-
----
-
-## Harness Model
-
-A model answers a question. An agent finishes a task. The difference is the
-harness: the rules, tools, evidence, and feedback that keep the model oriented
-when user intent, repo instructions, tool output, stale memory, and prior
-handoffs all compete inside one turn.
-
-CodeWhale's harness has four practical parts:
-
-| Part | What it does |
-| --- | --- |
-| Prompt constitution | `crates/tui/src/prompts/base.md` gives the model a stable authority hierarchy: live user intent beats stale instructions, live tool output beats assumptions, and verification beats confidence. |
-| Typed tool surface | Shell, file, git, web, MCP, RLM, image, and sub-agent tools are registered with explicit schemas, visibility rules, and compatibility aliases. |
-| Runtime evidence loop | Side-git snapshots, LSP diagnostics, command output, cost/cache accounting, and task state are fed back into the transcript instead of hidden behind the UI. |
-| Approval and sandbox posture | Plan is read-only, Agent uses approval gates, and YOLO auto-approves in trusted workspaces. macOS Seatbelt is enforced; Linux Landlock is detected but not yet enforced; Windows sandboxing is not advertised. |
-
-### Relay And Continuity
-
-Relay is intentional compaction for human and agent handoff. Use `/relay` before
-a long break, a fresh thread, a fork, or a handoff to another agent. It keeps the
-important story small: the objective, why the work is being done, current state,
-changed files, evidence checked, constraints, blockers, and the next concrete
-action.
-
-Automatic compaction protects context windows. Relay protects continuity. In
-the v0.9 track, rich PlanArtifact fields feed the transcript card, Plan-mode
-confirmation, `/relay`, fork-state handoff, and saved-session replay so the
-plan, the evidence, and the next step do not become separate stories.
-
-`codewhale` is the dispatcher CLI. `codewhale-tui` is the companion runtime
-binary it launches for interactive sessions. The TUI talks to an async engine,
-an OpenAI-compatible streaming client, the tool registry, the durable task
-queue, the LSP subsystem, and optional HTTP/SSE or ACP servers. See
-[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full walkthrough.
-
-### Auto Model Routing
-
-`--model auto` is the default. Before the real turn is sent, CodeWhale makes a
-small `deepseek-v4-flash` routing call with thinking off. That local router
-selects the concrete model and thinking level for the real request:
-
-- Model: `deepseek-v4-flash` or `deepseek-v4-pro`
-- Thinking: `off`, `high`, or `max`
-
-The upstream API never receives `model: "auto"`; it receives the concrete route
-chosen for that turn. Use a fixed model or thinking level for repeatable
-benchmarking, strict cost ceilings, or exact provider/model mapping.
-
-### Sub-agents
-
-Sub-agents run concurrently in the background. `agent_open` returns immediately;
-the child receives its own context and tool registry, then reports back with a
-completion sentinel and a human-readable summary. The full child transcript
-stays behind a bounded handle that the parent can inspect through `agent_eval`.
-
-Default concurrency is 10 and configurable up to 20. See
-[docs/SUBAGENTS.md](docs/SUBAGENTS.md) for role taxonomy, lifecycle, wait/eval
-tools, and transcript-handle details.
-
-## Provider Routes
-
-For the full provider registry, model IDs, auth variables, base URLs, and
-capability boundaries, see [docs/PROVIDERS.md](docs/PROVIDERS.md).
-
-Provider and model are deliberately separate choices. `provider` is the route,
-account, endpoint, and credential source; `model` is the model ID on that route.
-That distinction matters when the same model family appears through direct APIs
-and OpenRouter aliases.
-
-| Provider | Typical model IDs | Notes |
-| --- | --- | --- |
-| `deepseek` | `deepseek-v4-pro`, `deepseek-v4-flash` | Default direct DeepSeek route. |
-| `openrouter` | `deepseek/deepseek-v4-pro`, `arcee-ai/trinity-large-thinking`, `minimax/minimax-m3` | OpenRouter route; keep these IDs distinct from direct provider IDs. |
-| `arcee` | `trinity-large-thinking`, `trinity-large-preview`, `trinity-mini` | Direct Arcee API at `https://api.arcee.ai/api/v1`. |
-| `xiaomi-mimo` | `mimo-v2.5-pro`, `mimo-v2.5`, TTS IDs | Token Plan keys (`tp-...`) use `api-key` auth and default to the Token Plan endpoint; pay-as-you-go keys can set the MiMo API endpoint explicitly. |
-| `nvidia-nim` | `deepseek-ai/deepseek-v4-pro` | Uses NVIDIA account terms and model IDs. |
-| `siliconflow` / `siliconflow-CN` | `deepseek-ai/DeepSeek-V4-Pro` | SiliconFlow global and China routes. |
-| `fireworks` | `accounts/fireworks/models/deepseek-v4-pro` | Fireworks route. |
-| `openai` | Your gateway's model ID | Generic OpenAI-compatible endpoint. |
-| `huggingface` | `deepseek-ai/DeepSeek-V4-Pro` | Hugging Face router route. |
-| `sglang`, `vllm`, `ollama` | Local model IDs/tags | Self-hosted routes. |
-
-```bash
-codewhale auth set --provider openrouter --api-key "YOUR_OPENROUTER_API_KEY"
-codewhale --provider openrouter --model deepseek/deepseek-v4-pro
-
-codewhale auth set --provider arcee --api-key "YOUR_ARCEE_API_KEY"
-codewhale --provider arcee --model trinity-large-thinking
-
-codewhale auth set --provider xiaomi-mimo --api-key "YOUR_XIAOMI_KEY"
-codewhale --provider xiaomi-mimo --model mimo-v2.5-pro
-codewhale --provider xiaomi-mimo speech "Hello from MiMo" --model tts -o hello.wav
-XIAOMI_MIMO_TOKEN_PLAN_API_KEY="tp-..." XIAOMI_MIMO_MODE="token-plan-sgp" \
- codewhale --provider xiaomi-mimo --model mimo-v2.5-pro
-
-codewhale auth set --provider openai --api-key "YOUR_OPENAI_COMPATIBLE_API_KEY"
-OPENAI_BASE_URL="https://openai-compatible.example/v4" \
- codewhale --provider openai --model glm-5
-
-SGLANG_BASE_URL="http://localhost:30000/v1" \
- codewhale --provider sglang --model deepseek-v4-flash
-```
-
-Inside the TUI, `/provider` opens the provider picker and `/model` opens the
-model/thinking picker. `/models` fetches live API model lists when the active
-provider supports listing.
-
-## Platform Notes
-
-Prebuilt binary pairs and platform archives are published for Linux x64, Linux
-ARM64, macOS x64, macOS ARM64, and Windows x64. For other targets, see
-[docs/INSTALL.md](docs/INSTALL.md).
-
-For HarmonyOS PC and OpenHarmony cross-build setup, see [docs/HarmonyOS.md](docs/HarmonyOS.md).
-
-### China / Mirror-friendly Installation
-
-If GitHub or npm downloads are slow from mainland China, use
-`npm install -g codewhale --registry=https://registry.npmmirror.com`, download
-from GitHub Releases, or configure a Cargo registry mirror:
-
-```toml
-# ~/.cargo/config.toml
-[source.crates-io]
-replace-with = "tuna"
-
-[source.tuna]
-registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"
-```
-
-Then install both binaries:
-
```bash
cargo install codewhale-cli --locked
cargo install codewhale-tui --locked
codewhale --version
+codewhale --model auto
```
-Use `DEEPSEEK_TUI_RELEASE_BASE_URL` for mirrored release assets.
+On first launch, CodeWhale prompts for a DeepSeek API key and stores it in
+`~/.codewhale/config.toml`; legacy `~/.deepseek/` config is still read for
+compatibility.
-### Windows
-
-The Scoop `codewhale` manifest can lag GitHub/npm/Cargo releases. Run
-`scoop update` first, then verify with `codewhale --version`. Use npm or direct
-GitHub release downloads when you need the newest release immediately.
-
-### Remote-first Workspaces
-
-For an always-on workspace you can control from a phone, use the Tencent-native
-path: CNB mirror/source, Tencent Lighthouse HK, a Feishu/Lark long-connection
-bridge, and optional EdgeOne for a deliberate public HTTPS edge. The runtime API
-stays bound to localhost; EdgeOne is not used to expose `/v1/*`.
-
-Start with [docs/TENCENT_CLOUD_REMOTE_FIRST.md](docs/TENCENT_CLOUD_REMOTE_FIRST.md),
-then use [docs/TENCENT_LIGHTHOUSE_HK.md](docs/TENCENT_LIGHTHOUSE_HK.md) for the
-server runbook.
-
-
-Install from source
-
-Works on any Tier-1 Rust target including musl, riscv64, FreeBSD, and older
-ARM64 distros.
+Other install paths are supported:
```bash
-# Linux build deps (Debian/Ubuntu/RHEL):
-# sudo apt-get install -y build-essential pkg-config libdbus-1-dev
-# sudo dnf install -y gcc make pkgconf-pkg-config dbus-devel
+# Platform archives are attached to GitHub Releases.
+# https://github.com/Hmbown/CodeWhale/releases
-git clone https://github.com/Hmbown/CodeWhale.git
-cd CodeWhale
+# CNB mirror path for users who cannot reliably reach GitHub:
+cargo install --git https://cnb.cool/codewhale.net/codewhale --tag v0.8.54 codewhale-cli --locked --force
+cargo install --git https://cnb.cool/codewhale.net/codewhale --tag v0.8.54 codewhale-tui --locked --force
-cargo install --path crates/cli --locked
-cargo install --path crates/tui --locked
+# Legacy Homebrew compatibility while the formula is renamed
+brew tap Hmbown/deepseek-tui
+brew install deepseek-tui
```
-Both binaries are required. Rust 1.88+ is required because the crates use the
-2024 edition.
+The `codewhale` npm wrapper for v0.8.54 is intentionally deferred while the
+release asset publication path is being hardened. Use Cargo, GitHub Releases,
+or CNB for this release.
-
+For Docker, direct downloads, China mirrors, Windows/Scoop, Nix, checksums, and
+troubleshooting, use [docs/INSTALL.md](docs/INSTALL.md) or the website install
+page.
----
-
-## Release Notes
-
-Release-specific changes live in [CHANGELOG.md](CHANGELOG.md). This README
-stays focused on current install paths, core workflows, provider setup, runtime
-interfaces, and extension points.
-
----
-
-## Usage
+## First Run
```bash
-codewhale # interactive TUI
-codewhale "explain this function" # one-shot prompt
-codewhale exec --auto --output-format stream-json "fix this bug" # NDJSON backend stream
-codewhale exec --resume "follow up" # continue a non-interactive session
-codewhale --model deepseek-v4-flash "summarize" # model override
-codewhale --model auto "fix this bug" # auto-select model + thinking
-codewhale --yolo # auto-approve tools
-codewhale auth set --provider deepseek # save API key
-codewhale doctor # check setup & connectivity
-codewhale doctor --json # machine-readable diagnostics
-codewhale setup --status # read-only setup status
-codewhale setup --tools --plugins # scaffold tool/plugin dirs
-codewhale models # list live API models
-codewhale sessions # list saved sessions with timestamps
-codewhale resume --last # resume the most recent session in this workspace
-codewhale resume # resume a specific session by UUID
-codewhale fork # fork a saved session into a sibling path
-codewhale serve --http # HTTP/SSE API server
-codewhale serve --mobile # LAN mobile control page; token-gated by default
-codewhale serve --acp # ACP stdio adapter for Zed/custom agents
-codewhale run pr # fetch PR and pre-seed review prompt
-codewhale mcp list # list configured MCP servers
-codewhale mcp validate # validate MCP config/connectivity
-codewhale mcp-server # run dispatcher MCP stdio server
-codewhale update # check for and apply binary updates
+codewhale auth set --provider deepseek
+codewhale auth status
+codewhale doctor
+codewhale
```
-Inside the interactive TUI composer, prefix a line with `!` to run a shell
-command through the normal approval, sandbox, and output surfaces, for example
-`! cargo test -p codewhale-tui sidebar`.
+Useful in-session commands:
-### Branching Conversations
+- `/provider` and `/model` choose the route and model.
+- `/config` edits runtime settings.
+- `/statusline` shows the current route, cost, and session state.
+- `/skills` loads reusable workflows from `~/.codewhale/skills/`.
+- `/restore` rolls back a prior turn from side-git snapshots.
+- `! cargo test -p codewhale-tui` runs a shell command through the normal
+ approval and sandbox path.
-Saved sessions are intentionally branchable. `codewhale fork ` copies
-an existing saved session into a new sibling session, records the parent session
-id in metadata, and opens that fork so you can explore an alternate direction
-without polluting the original path. The session picker and `codewhale sessions`
-mark forked sessions with their parent id.
+## Where Details Live
-`codewhale sessions` lists saved sessions across workspaces and includes the
-last-updated timestamp. `codewhale resume --last` and `codewhale --continue`
-choose the latest session for the current workspace; pass an explicit session id
-when resuming work from another directory.
+The README carries the idea and the first path. The details live in docs and on
+[codewhale.net](https://codewhale.net/):
-Inside the TUI, Esc-Esc backtrack can rewind the active transcript to a prior
-user prompt and put that prompt back in the composer for editing. `/restore`
-and `revert_turn` are separate workspace rollback tools: they restore files
-from side-git snapshots but do not rewrite conversation history.
+- [User guide](docs/GUIDE.md) — first hour with CodeWhale.
+- [Install guide](docs/INSTALL.md) — every package path and troubleshooting.
+- [Configuration](docs/CONFIGURATION.md) — config files, repo constitution, and
+ provider settings.
+- [Provider registry](docs/PROVIDERS.md) — model routes, credentials, base URLs,
+ and capability boundaries.
+- [Sub-agents](docs/SUBAGENTS.md) — roles, lifecycle, output contract, and
+ recovery behavior.
+- [Runtime API](docs/RUNTIME_API.md) — HTTP/SSE, ACP, mobile, and GUI/editor
+ integration contracts.
+- [Model Lab](docs/MODEL_LAB.md) — open-model discovery and evaluation roadmap.
+- [Architecture](docs/ARCHITECTURE.md) — crate layout, runtime flow, tool system,
+ extension points, and security model.
+- [v0.9.0 release acceptance](docs/V0_9_0_RELEASE_ACCEPTANCE.md) — current
+ integration checks before release tagging.
-Docker images are published to GHCR for release builds:
+## v0.9.0 Track
-```bash
-docker volume create codewhale-home
+v0.9.0 is the current integration lane, not a published release until the tag,
+GitHub Release, npm package, Cargo crates, and release artifacts are actually
+cut and verified.
-docker run --rm -it \
- -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
- -v codewhale-home:/home/codewhale/.codewhale \
- -v "$PWD:/workspace" \
- -w /workspace \
- ghcr.io/hmbown/codewhale:latest
-```
+The release line is gathering work around:
-See [docs/DOCKER.md](docs/DOCKER.md) for pinned tags, local image builds,
-volume ownership notes, and non-interactive pipeline usage.
+- stronger relay and handoff surfaces;
+- calmer transcripts for dense tool runs;
+- command and provider architecture cleanup;
+- runtime APIs for VS Code and GUI clients;
+- typed HarnessProfile posture and model routing;
+- WhaleFlow branch/leaf workflow orchestration;
+- contributor credit hygiene for harvested and direct community PRs.
-### Zed / ACP
-
-CodeWhale can run as a custom Agent Client Protocol server for editors that
-spawn local ACP agents over stdio. In Zed, add a custom agent server:
-
-```json
-{
- "agent_servers": {
- "DeepSeek": {
- "type": "custom",
- "command": "codewhale",
- "args": ["serve", "--acp"],
- "env": {}
- }
- }
-}
-```
-
-The first ACP slice supports new sessions and prompt responses through your
-existing DeepSeek config/API key. Tool-backed editing and checkpoint replay are
-not exposed through ACP yet.
-
-Community-maintained adapter: [acp-codewhale-adapter](https://github.com/rockeverm3m/acp-codewhale-adapter)
-bridges `codewhale exec --auto` to `cc-connect` for users who need tool-backed
-ACP workflows outside the built-in Zed slice.
-
-### Keyboard Shortcuts
-
-| Key | Action |
-|---|---|
-| `Tab` | Complete `/` or `@` entries; while running, queue draft as follow-up; otherwise cycle mode |
-| `Shift+Tab` | Cycle reasoning-effort: off → high → max |
-| `F1` | Searchable help overlay |
-| `Esc` | Back / dismiss |
-| `Ctrl+K` | Command palette |
-| `Ctrl+R` | Resume an earlier session |
-| `Alt+R` | Search prompt history and recover cleared drafts |
-| `Ctrl+S` | Stash current draft (`/stash list`, `/stash pop` to recover) |
-| `@path` | Attach file/directory context in composer |
-| `↑` (at composer start) | Select attachment row for removal |
-
-Full shortcut catalog: [docs/KEYBINDINGS.md](docs/KEYBINDINGS.md).
-
----
-
-## Modes
-
-| Mode | Behavior |
-| --- | --- |
-| **Plan** 🔍 | Read-only investigation — model explores and proposes a plan before making changes; multi-step investigations use `checklist_write` |
-| **Agent** 🤖 | Default interactive mode — multi-step tool use with approval gates; substantial work is tracked with `checklist_write` |
-| **YOLO** ⚡ | Auto-approve all tools in a trusted workspace; multi-step work still keeps a visible checklist |
-
----
-
-## Configuration
-
-User config: `~/.codewhale/config.toml` (legacy `~/.deepseek/config.toml` fallback). Project overlay: `/.codewhale/config.toml` (legacy `/.deepseek/config.toml`) (denied: `api_key`, `base_url`, `provider`, `mcp_config_path`). [config.example.toml](config.example.toml) has every option.
-
-The TUI footer can be trimmed with `/statusline`, or by setting
-`[tui].status_items` in config. Current footer customization selects from the
-built-in chips such as `mode`, `model`, `status`, `git_branch`, `tokens`, and
-`cache`; chip order is controlled by the order of keys in `status_items` in
-`config.toml`. The interactive picker writes the canonical order. Multi-line
-layouts, custom colors, and external command widgets are not part of the
-current statusline surface.
-
-Custom DeepSeek-compatible endpoints usually do not need a new provider. Keep
-`provider = "deepseek"` and set `[providers.deepseek].base_url` / `model`, or
-use `provider = "openai"` for generic OpenAI-compatible gateways. Keep
-`provider`, `api_key`, and `base_url` in user config or environment variables;
-project overlays cannot set them.
-
-Key environment variables:
-
-| Variable | Purpose |
-|---|---|
-| `DEEPSEEK_API_KEY` | API key |
-| `DEEPSEEK_BASE_URL` | API base URL |
-| `DEEPSEEK_HTTP_HEADERS` | Optional custom model request headers, e.g. `X-Model-Provider-Id=your-model-provider` |
-| `DEEPSEEK_MODEL` | Default model |
-| `DEEPSEEK_STREAM_IDLE_TIMEOUT_SECS` | Legacy stream idle timeout env override, default `300`, clamped to `1..=3600`; `[tui].stream_chunk_timeout_secs` takes precedence when configured |
-| `CODEWHALE_PROVIDER` / `DEEPSEEK_PROVIDER` | `deepseek` (default), `nvidia-nim`, `openai`, `atlascloud`, `wanjie-ark`, `volcengine`, `openrouter`, `xiaomi-mimo`, `novita`, `fireworks`, `siliconflow`, `siliconflow-CN`, `arcee`, `moonshot`, `sglang`, `vllm`, `ollama`, `huggingface` |
-| `DEEPSEEK_PROFILE` | Config profile name |
-| `DEEPSEEK_MEMORY` | Set to `on` to enable user memory |
-| `DEEPSEEK_ALLOW_INSECURE_HTTP=1` | Allow non-local `http://` API base URLs on trusted networks |
-| `NVIDIA_API_KEY` / `OPENAI_API_KEY` / `ATLASCLOUD_API_KEY` / `WANJIE_ARK_API_KEY` / `VOLCENGINE_API_KEY` / `VOLCENGINE_ARK_API_KEY` / `ARK_API_KEY` / `OPENROUTER_API_KEY` / `XIAOMI_MIMO_TOKEN_PLAN_API_KEY` / `MIMO_TOKEN_PLAN_API_KEY` / `XIAOMI_MIMO_API_KEY` / `XIAOMI_API_KEY` / `MIMO_API_KEY` / `NOVITA_API_KEY` / `FIREWORKS_API_KEY` / `SILICONFLOW_API_KEY` / `ARCEE_API_KEY` / `MOONSHOT_API_KEY` / `KIMI_API_KEY` / `SGLANG_API_KEY` / `VLLM_API_KEY` / `OLLAMA_API_KEY` / `HUGGINGFACE_API_KEY` / `HF_TOKEN` | Provider auth |
-| `OPENAI_BASE_URL` / `OPENAI_MODEL` | Generic OpenAI-compatible endpoint and model ID |
-| `ATLASCLOUD_BASE_URL` / `ATLASCLOUD_MODEL` | AtlasCloud endpoint and model override |
-| `WANJIE_ARK_BASE_URL` / `WANJIE_ARK_MODEL` | Wanjie Ark endpoint and model override |
-| `VOLCENGINE_BASE_URL` / `VOLCENGINE_ARK_BASE_URL` / `ARK_BASE_URL` / `VOLCENGINE_MODEL` / `VOLCENGINE_ARK_MODEL` | Volcengine Ark endpoint and model override |
-| `OPENROUTER_BASE_URL` | OpenRouter endpoint override |
-| `XIAOMI_MIMO_BASE_URL` / `MIMO_BASE_URL` / `XIAOMI_MIMO_MODEL` / `MIMO_MODEL` / `XIAOMI_MIMO_MODE` / `MIMO_MODE` | Xiaomi MiMo endpoint, model, and Token Plan mode override; Token Plan default is `https://token-plan-sgp.xiaomimimo.com/v1` |
-| `NOVITA_BASE_URL` | Novita endpoint override |
-| `FIREWORKS_BASE_URL` | Fireworks endpoint override |
-| `SILICONFLOW_BASE_URL` / `SILICONFLOW_MODEL` | SiliconFlow endpoint and model override |
-| `ARCEE_BASE_URL` / `ARCEE_MODEL` | Arcee AI endpoint and model override |
-| `SGLANG_BASE_URL` | Self-hosted SGLang endpoint |
-| `SGLANG_MODEL` | Self-hosted SGLang model ID |
-| `VLLM_BASE_URL` | Self-hosted vLLM endpoint |
-| `VLLM_MODEL` | Self-hosted vLLM model ID |
-| `OLLAMA_BASE_URL` | Self-hosted Ollama endpoint |
-| `OLLAMA_MODEL` | Self-hosted Ollama model tag |
-| `HUGGINGFACE_API_KEY` / `HF_TOKEN` / `HUGGINGFACE_BASE_URL` / `HUGGINGFACE_MODEL` | Hugging Face endpoint and model override |
-| `NO_ANIMATIONS=1` | Force accessibility mode at startup |
-| `SSL_CERT_FILE` | Custom CA bundle for corporate proxies; prefer this over provider-local `insecure_skip_tls_verify` |
-
-Set `locale` in `settings.toml`, use `/config locale zh-Hans`, or rely on `LC_ALL`/`LANG` to choose UI chrome and the fallback language sent to V4 models. The latest user message still wins for natural-language reasoning and replies, so Chinese user turns stay Chinese even on an English system locale. See [docs/CONFIGURATION.md](docs/CONFIGURATION.md) and [docs/MCP.md](docs/MCP.md).
-
----
-
-## Models & Cost Tracking
-
-CodeWhale tracks the provider route, concrete model, prompt-cache hit/miss
-estimate, input tokens, and output tokens for the turn that actually ran. Auto
-mode is resolved before the upstream request, so the footer and session summary
-charge against `deepseek-v4-flash`, `deepseek-v4-pro`, or the explicit provider
-model selected for that turn.
-
-Pricing changes over time and can vary by account, region, provider route, and
-promotion. Use [docs/PROVIDERS.md](docs/PROVIDERS.md) for supported model IDs
-and the provider's official pricing pages for billing decisions. Treat the TUI
-cost display as a local estimate, not a receipt.
-
-DeepSeek Platform defaults to `https://api.deepseek.com/beta` so beta-gated API
-features can be tested without extra setup. Set `base_url =
-"https://api.deepseek.com"` to opt out. Legacy aliases `deepseek-chat` /
-`deepseek-reasoner` remain compatibility shims; prefer V4 model IDs for new
-config. NVIDIA NIM variants use your NVIDIA account terms.
-
----
-
-## Publishing Your Own Skill
-
-codewhale discovers skills from workspace directories (`.agents/skills` → `skills` → `.opencode/skills` → `.claude/skills` → `.cursor/skills`) and global directories (`~/.agents/skills` → `~/.claude/skills` → `~/.codewhale/skills` → `~/.deepseek/skills`). Each skill is a directory with a `SKILL.md` file:
-
-```text
-~/.agents/skills/my-skill/
-└── SKILL.md
-```
-
-Frontmatter required:
-
-```markdown
----
-name: my-skill
-description: Use this when DeepSeek should follow my custom workflow.
----
-
-# My Skill
-Instructions for the agent go here.
-```
-
-Commands: `/skills` (list), `/skill ` (activate), `/skill new` (scaffold), `/skill install github:/` (community), `/skill update` / `uninstall` / `trust`. Community installs from GitHub require no backend service. Installed skills appear in the model-visible session context; the agent can auto-select relevant skills via the `load_skill` tool when your task matches their descriptions.
-
-First launch also installs bundled system skills for common workflows:
-`skill-creator`, `delegate`, `v4-best-practices`, `plugin-creator`,
-`skill-installer`, `mcp-builder`, `documents`, `presentations`,
-`spreadsheets`, `pdf`, and `feishu`. These live under
-`~/.codewhale/skills` (or legacy `~/.deepseek/skills`) and are versioned so new bundles are added on upgrade
-without recreating skills the user deliberately deleted.
-
----
-
-## Documentation
-
-| Doc | Topic |
-|---|---|
-| [GUIDE.md](docs/GUIDE.md) | First-run user guide |
-| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | Codebase internals |
-| [CONFIGURATION.md](docs/CONFIGURATION.md) | Full config reference |
-| [PROVIDERS.md](docs/PROVIDERS.md) | Provider IDs, auth, model defaults, and capability metadata |
-| [MODES.md](docs/MODES.md) | Plan / Agent / YOLO modes |
-| [MCP.md](docs/MCP.md) | Model Context Protocol integration |
-| [RUNTIME_API.md](docs/RUNTIME_API.md) | HTTP/SSE API server and mobile control page |
-| [INSTALL.md](docs/INSTALL.md) | Platform-specific install guide |
-| [DOCKER.md](docs/DOCKER.md) | GHCR image, volumes, and Docker usage |
-| [CNB_MIRROR.md](docs/CNB_MIRROR.md) | CNB mirror and China-friendly install notes |
-| [TENCENT_CLOUD_REMOTE_FIRST.md](docs/TENCENT_CLOUD_REMOTE_FIRST.md) | Tencent/CNB/Lighthouse/Feishu remote-first path |
-| [TENCENT_LIGHTHOUSE_HK.md](docs/TENCENT_LIGHTHOUSE_HK.md) | Lighthouse Hong Kong server setup |
-| [MEMORY.md](docs/MEMORY.md) | User memory feature guide |
-| [AGENT_ETHOS.md](docs/AGENT_ETHOS.md) | Maintainer and agent stewardship posture |
-| [SUBAGENTS.md](docs/SUBAGENTS.md) | Sub-agent role taxonomy and lifecycle |
-| [KEYBINDINGS.md](docs/KEYBINDINGS.md) | Full shortcut catalog |
-| [RELEASE_RUNBOOK.md](docs/RELEASE_RUNBOOK.md) | Release process |
-| [LOCALIZATION.md](docs/LOCALIZATION.md) | UI locale matrix & switching |
-| [OPERATIONS_RUNBOOK.md](docs/OPERATIONS_RUNBOOK.md) | Ops & recovery |
-| [V0_9_0_RELEASE_ACCEPTANCE.md](docs/V0_9_0_RELEASE_ACCEPTANCE.md) | v0.9.0 pre-tag acceptance matrix and release gates |
-| [HARNESS_PROFILE_CUTLINE.md](docs/HARNESS_PROFILE_CUTLINE.md) | HarnessProfile schema, resolver, and runtime boundary for v0.9 |
-| [2574-provider-fallback-chain.md](docs/rfcs/2574-provider-fallback-chain.md) | Provider fallback chain RFC |
-
-Full Changelog: [CHANGELOG.md](CHANGELOG.md).
-
----
+Release-specific details belong in [CHANGELOG.md](CHANGELOG.md) and the v0.9.0
+acceptance docs, not in this README.
## Thanks
diff --git a/README.vi.md b/README.vi.md
index c65f3daf..a1cdb4e9 100644
--- a/README.vi.md
+++ b/README.vi.md
@@ -1,517 +1,88 @@
-# 🐳 CodeWhale
+# CodeWhale
-> **Agent lập trình gốc terminal dành cho DeepSeek V4. Chương trình chạy từ lệnh `codewhale`, hỗ trợ stream các khối suy nghĩ (reasoning blocks), chỉnh sửa workspace cục bộ thông qua các lớp phê duyệt, và đi kèm chế độ tự động để tự chọn mô hình cũng như mức độ suy nghĩ phù hợp cho mỗi lượt.**
+> Harness agent local cho DeepSeek V4 và model mở: bản ngã vận hành, thứ bậc quyền lực, và vòng chứng cứ.
-[English README](README.md)
-[简体中文 README](README.zh-CN.md)
-[日本語 README](README.ja-JP.md)
+[English README](README.md) · [简体中文 README](README.zh-CN.md) · [日本語 README](README.ja-JP.md)
+
+
+
+## Ý tưởng chính
+
+Phần lớn coding agent bắt đầu bằng sức mạnh: nhiều công cụ hơn, context dài hơn, tự động hóa nhiều hơn. CodeWhale bắt đầu bằng trách nhiệm.
+
+Trước khi một agent sửa repo, nó cần một địa chỉ: terminal này, người dùng này, branch này, session này. Đó là lớp ego. Không phải khoe mẽ, mà là tính liên tục. Không phải mặt nạ personality, mà là nơi trách nhiệm bám vào.
+
+Sau đó nó cần luật. Workspace thật là một chồng xung đột: ý định hiện tại của người dùng, hướng dẫn trong repo, output từ shell, memory cũ, handoff cũ, chính sách an toàn và thay đổi đang dang dở có thể va vào nhau trong cùng một lượt. Constitution của CodeWhale xếp thứ tự cho các nguồn đó: yêu cầu hiện tại cao hơn ngữ cảnh cũ; bằng chứng trực tiếp cao hơn phỏng đoán; kiểm chứng cao hơn sự tự tin; personality chỉ điều chỉnh giọng nói, không quyết định hành động.
+
+Sản phẩm thật là lớp sắp thứ tự quanh model: ai đang hành động, luật nào thắng, chứng cứ nào tồn tại, và người hoặc agent tiếp theo có thể tiếp tục ra sao.
+
+## CodeWhale cung cấp gì
+
+- TUI chạy cục bộ trong terminal.
+- Công cụ có schema cho file, Shell, Git, Web, MCP, RLM và sub-agent.
+- Cổng phê duyệt, sandbox, snapshot side-git và rollback bằng `/restore`.
+- Phản hồi diagnostics từ language server sau khi chỉnh sửa.
+- Sub-agent chạy song song, session bền, fork, relay handoff và Runtime API.
+- DeepSeek V4 là đường chính, cùng các provider rõ ràng như OpenRouter, Xiaomi MiMo, NVIDIA NIM, Arcee, SiliconFlow, Fireworks, Novita, SGLang/vLLM tự host, Ollama và các bề mặt Hugging Face khi chúng được hoàn thiện.
+
+DeepSeek là first-class, nhưng không phải giới hạn duy nhất. Provider, model, base URL và credentials là các lựa chọn tách biệt.
## Cài đặt
-`codewhale` được cài đặt dưới dạng một cặp binary tự chạy bằng Rust đồng bộ với nhau:
-Lệnh điều phối `codewhale` (dispatcher) và môi trường chạy giao diện `codewhale-tui` (runtime) do nó khởi chạy để thực hiện các phiên làm việc tương tác. npm và Docker sẽ tự động cài đặt cả hai cho bạn; đối với Cargo hoặc cài đặt thủ công, bạn phải đặt cả hai tệp binary này trong cùng một thư mục (thông thường là một thư mục nằm trong biến môi trường `PATH` của bạn). Gói npm chỉ là một trình cài đặt/bao bọc (wrapper) cho các tệp binary phát hành này; agent không chạy trên môi trường Node.js.
-
```bash
-# 1. npm — dễ nhất nếu bạn đã cài đặt Node. Gói này sẽ tự động tải các
-# binary Rust dựng sẵn tương ứng từ GitHub Releases.
-npm install -g codewhale
-
-# 2. Cargo — không cần Node. Yêu cầu phiên bản Rust từ 1.88 trở lên (các crate sử dụng
-# phiên bản Rust edition 2024; các toolchain cũ hơn sẽ báo lỗi "feature `edition2024` is
-# required"). Hãy chạy lệnh `rustup update` trước, hoặc sử dụng các cách cài đặt không qua Cargo ở dưới.
-cargo install codewhale-cli --locked # cài đặt `codewhale` (điểm truy cập CLI chính)
-cargo install codewhale-tui --locked # cài đặt `codewhale-tui` (giao diện TUI)
-
-# 3. Homebrew — chỉ dành cho khả năng tương thích với cài đặt cũ.
-# Tap/formula vẫn dùng tên deepseek-tui cũ. Với cài đặt mới, hãy ưu tiên
-# npm, Cargo, Docker hoặc tải trực tiếp cho đến khi formula được đổi tên.
-brew tap Hmbown/deepseek-tui
-brew install deepseek-tui
-
-# 4. Tải xuống trực tiếp — các gói lưu trữ theo nền tảng từ GitHub Releases.
-# https://github.com/Hmbown/CodeWhale/releases
-# Gói nén bao gồm cả codewhale và codewhale-tui cùng một tập lệnh cài đặt.
-# Các binary riêng lẻ cũng được đính kèm cho các tập lệnh; hãy giữ cặp này ở cùng một nơi.
-
-# 5. Docker — hình ảnh phát hành dựng sẵn.
-docker volume create codewhale-home
-docker run --rm -it \
- -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
- -v codewhale-home:/home/codewhale/.codewhale \
- -v "$PWD:/workspace" \
- -w /workspace \
- ghcr.io/hmbown/codewhale:latest
-```
-
-> Tại Trung Quốc đại lục, bạn có thể tăng tốc độ tải qua npm bằng tham số
-> `--registry=https://registry.npmmirror.com`, hoặc sử dụng
-> [Cargo mirror](#china--cai-dat-than-thien-qua-mirror) bên dưới.
->
-> An toàn tải xuống: Các binary phát hành chính thức chỉ nằm tại
-> `https://github.com/Hmbown/CodeWhale/releases`. Nếu tải thủ công,
-> vui lòng xác minh mã băm SHA-256 manifest và tránh các kho lưu trữ giả mạo hoặc các
-> trang web mirror trên kết quả tìm kiếm. Xem [an toàn tải xuống và mã xác thực](docs/INSTALL.md#2-download-safety-and-checksums).
-
-Đã cài đặt từ trước? Sử dụng lệnh cập nhật tương ứng với cách bạn đã cài đặt:
-
-```bash
-codewhale update # trình cập nhật binary phát hành trực tiếp
-npm install -g codewhale@latest # thông qua trình bao bọc npm
-brew update && brew upgrade deepseek-tui # chỉ cho cài đặt Homebrew cũ
-cargo install codewhale-cli --locked --force
-cargo install codewhale-tui --locked --force
-```
-
-[](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml)
-[](https://www.npmjs.com/package/codewhale)
-[](https://crates.io/crates/codewhale-cli)
-[Mục lục dự án DeepWiki](https://deepwiki.com/Hmbown/CodeWhale)
-
-
-
----
-
-## CodeWhale là gì?
-
-Mô hình AI chỉ trả lời câu hỏi. Agent hoàn thành một nhiệm vụ. Sự khác biệt nằm ở
-**khung ràng buộc (harness)** — một hệ thống các quy tắc, bằng chứng và phản hồi giúp giữ cho
-mô hình đi đúng hướng thay vì bị trôi lệch mục tiêu.
-
-CodeWhale chính là khung ràng buộc đó, được xây dựng xung quanh DeepSeek V4 và được dẫn dắt bởi ba ý tưởng chính:
-
-| Nguyên tắc | Cách thức hoạt động |
-|---|---|
-| **Bắt đầu với sự tin tưởng** | Mỗi lượt bắt đầu bằng chữ "A" — tìm kiếm khả năng trước khi khẳng định chắc chắn, chú trọng chất lượng trước sự tiện lợi |
-| **Thẩm quyền rõ ràng** | Một bản Hiến pháp bằng văn bản với chín cấp bậc thẩm quyền. Ý định của người dùng quan trọng hơn các hướng dẫn cũ kỹ. Sự xác minh quan trọng hơn sự tự tin. |
-| **Cải tiến đệ quy** | V4 đã tham gia viết nên một phần của khung ràng buộc này. Khi khung ràng buộc tốt lên, V4 hoạt động hiệu quả hơn — và giúp cải tiến khung ràng buộc hơn nữa. Mỗi lượt chạy mới đều bắt đầu mạnh mẽ hơn. |
-
-Dự án này là mã nguồn mở, hoạt động trực tiếp trên terminal và được đóng gói thành một cặp binary Rust đồng bộ là `codewhale` / `codewhale-tui`.
-
-## Khung Ràng Buộc Hoạt Động Thế Nào?
-
-Các mô hình dạng Agent phải xử lý lượng thông tin xung đột rất lớn trên quy mô lớn: ý định của người dùng, quy tắc dự án, cấu hình mặc định của hệ thống, đầu ra của công cụ và bộ nhớ cũ đều cạnh tranh thẩm quyền trong một lượt chạy duy nhất. LLM hoạt động như một thẩm phán cần có thẩm quyền rõ ràng — nguồn thông tin nào sẽ thắng thế khi xảy ra xung đột?
-
-CodeWhale giải quyết vấn đề này bằng một bản **Hiến pháp** (`prompts/base.md`). Đây là một hệ thống phân cấp luật chính thức — Điều VII xếp hạng chín nguồn thông tin từ các điều khoản của chính Hiến pháp xuống đến thông tin bàn giao từ phiên làm việc trước. Tin nhắn hiện tại của người dùng có thẩm quyền cao hơn các hướng dẫn dự án cũ kỹ. Đầu ra trực tiếp từ công cụ có thẩm quyền cao hơn các giả định. Việc xác minh thực tế có thẩm quyền cao hơn sự tự tin của mô hình. Mô hình kế thừa một chuỗi thẩm quyền rõ ràng qua từng lượt và không bao giờ phải đoán xem nên làm theo chỉ thị nào.
-
-Có bảy điều khoản đứng đầu hệ thống phân cấp này, định nghĩa danh tính, nghĩa vụ và quyền hạn của mô hình: yêu cầu xác minh (Điều V — mọi hành động phải để lại bằng chứng thực tế, không bao giờ tuyên bố thành công dựa trên niềm tin mơ hồ), di sản điều phối (Điều VI — giữ cho workspace dễ đọc để trí tuệ tiếp theo có thể tiếp quản), và điều khoản ưu tiên sự thật (Điều II — không có quy tắc cấp dưới nào được phép ghi đè lên nó).
-
-Bộ nhớ đệm tiền tố (prefix caching) của DeepSeek V4 làm cho điều này trở nên khả thi và thực tế. Bản Hiến pháp rất dài và chi tiết, nhưng một khi đã được cache, nó sẽ tốn ít hơn khoảng 100 lần chi phí cho mỗi lượt so với một lần đọc mới hoàn toàn. Mô hình tham chiếu nó một cách đệ quy — xem qua, quét và truy vấn thông qua các phiên RLM — truy cập lại thông tin theo nhu cầu thay vì chỉ dựa trên một lượt ghi nhớ duy nhất. Nó hoạt động giống như một bài kiểm tra mở sách hơn là kiểm tra đóng sách.
-
-Bởi vì cấu trúc thẩm quyền là tường minh, các lỗi và thất bại không bao giờ bị che giấu. Các mã thoát (exit codes) khác không, lỗi kiểu dữ liệu từ rust-analyzer trả về giữa các lượt, từ chối của sandbox — tất cả đều được đưa ngược lại như các vectơ sửa lỗi. Mô hình sử dụng chính sự chệch hướng của mình để tự sửa sai.
-
-Ba chế độ kiểm soát không gian hành động: **Plan** là chế độ chỉ đọc. **Agent** chặn các thao tác can thiệp thay đổi file đằng sau quyền phê duyệt của người dùng. **YOLO** tự động phê duyệt tất cả các công cụ trong các workspace đáng tin cậy. Chế độ Sandbox hoạt động trên macOS Seatbelt; Linux Landlock đã được phát hiện nhưng chưa được áp dụng bắt buộc; chế độ sandboxing trên Windows hiện chưa được hỗ trợ.
-
-**Fin** — một cuộc gọi Flash giá rẻ và tắt chức năng suy nghĩ — xử lý việc tự động định tuyến mô hình cho mỗi lượt. Tham số mặc định là `--model auto`.
-
-Mỗi lượt chạy đều ghi lại một ảnh chụp nhanh side-git bên ngoài thư mục `.git` của repo. Các lệnh `/restore` và `revert_turn` giúp khôi phục nhanh workspace về trạng thái trước đó.
-
-Các sub-agent chạy đồng thời (tối đa 20). Lệnh `agent_open` trả về kết quả ngay lập tức; kết quả trả về nội tuyến dưới dạng các sentinel hoàn thành kèm theo bản tóm tắt. Nhật ký chi tiết của sub-agent được lưu trữ và truy cập thông qua `agent_eval`. Xem chi tiết tại [docs/SUBAGENTS.md](docs/SUBAGENTS.md).
-
-Các tính năng khác của hệ thống bao gồm: chẩn đoán lỗi LSP sau mỗi lần chỉnh sửa file (rust-analyzer, pyright, typescript-language-server, gopls, clangd), các phiên làm việc RLM để phân tích hàng loạt, giao thức MCP, API runtime HTTP/SSE, hàng đợi tác vụ liên tục, adapter ACP cho trình soạn thảo Zed, xuất kết quả định dạng SWE-bench và theo dõi chi phí trực tiếp với bảng phân tích chi tiết lượt hit/miss cache.
-
----
-
-## Khung Kết Nối (Harness)
-
-`codewhale` (CLI điều phối) → `codewhale-tui` (binary giao diện) → giao diện ratatui ↔ công cụ bất đồng bộ ↔ máy khách streaming tương thích với OpenAI. Các lượt gọi công cụ được định tuyến qua một registry có phân loại (shell, thao tác file, git, web, sub-agent, MCP, RLM) và kết quả được truyền trực tuyến trở lại transcript. Công cụ quản lý trạng thái phiên làm việc, theo dõi lượt chạy, hàng đợi tác vụ bền bỉ và một phân hệ LSP cung cấp thông tin chẩn đoán sau khi chỉnh sửa vào ngữ cảnh của mô hình trước bước suy nghĩ tiếp theo.
-
-Xem tài liệu [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) để biết chi tiết toàn bộ luồng hoạt động.
-
-### Sub-agents: Khởi chạy Tác vụ Nền Đồng thời
-
-CodeWhale có thể điều phối nhiều sub-agent chạy song song — hoạt động giống như một hàng đợi tác vụ đồng thời:
-
-- **Khởi chạy không chặn:** Lệnh `agent_open` trả về ngay lập tức. Sub-agent con có một ngữ cảnh độc lập mới và hệ thống đăng ký công cụ riêng để chạy tự chủ. Agent cha vẫn tiếp tục làm việc bình thường.
-- **Thực thi dưới nền:** Các sub-agent chạy đồng thời (giới hạn mặc định: 10, có thể cấu hình lên đến 20). Hệ thống tự quản lý pool tài nguyên này mà không cần vòng lặp thăm dò (polling loop).
-- **Thông báo hoàn thành:** Khi một sub-agent hoàn thành, hệ thống sẽ chèn một khóa sentinel `` vào transcript của agent cha. Một bản tóm tắt thân thiện với con người — bao gồm phát hiện của sub-agent con, các file đã thay đổi và các rủi ro có thể xảy ra — nằm ngay dòng phía trên khóa sentinel. Mô hình cha sẽ đọc tóm tắt đó và tích hợp kết quả thu được mà không cần phải thực hiện thêm bất kỳ lệnh gọi công cụ nào khác.
-- **Truy xuất kết quả có giới hạn:** Nhật ký chi tiết của agent con nằm dưới dạng một `transcript_handle` có thể truy cập qua `agent_eval`. Khi bản tóm tắt là chưa đủ, agent cha có thể gọi `handle_read` để đọc một phần, các dòng cụ thể hoặc lọc qua JSONPath — giúp ngữ cảnh của agent cha luôn tinh gọn mà không làm mất đi các chi tiết quan trọng.
-
-Xem thêm tài liệu [docs/SUBAGENTS.md](docs/SUBAGENTS.md) để tham khảo thông tin đầy đủ về sub-agent.
-
----
-
-## Khởi động nhanh
-
-```bash
-npm install -g codewhale
+cargo install codewhale-cli --locked
+cargo install codewhale-tui --locked
codewhale --version
codewhale --model auto
```
-Cặp binary dựng sẵn và gói nén nền tảng được phát hành cho các kiến trúc **Linux x64**, **Linux ARM64** (từ v0.8.8 trở lên), **macOS x64**, **macOS ARM64**, và **Windows x64**. Đối với các mục tiêu khác (musl, riscv64, FreeBSD, v.v.), xem phần [Cài đặt từ nguồn](#install-from-source) hoặc tài liệu [docs/INSTALL.md](docs/INSTALL.md).
-
-Trong lần chạy đầu tiên, bạn sẽ được nhắc nhập [API key của DeepSeek](https://platform.deepseek.com/api_keys). Khóa này được lưu vào tệp cấu hình `~/.codewhale/config.toml` (tương thích cả tệp cũ `~/.deepseek/config.toml`) để nó hoạt động từ bất kỳ thư mục nào mà không cần nhắc thông tin đăng nhập của hệ điều hành.
-
-Bạn cũng có thể thiết lập trước:
+Các đường khác:
```bash
-codewhale auth set --provider deepseek # lưu vào ~/.codewhale/config.toml
-codewhale auth status # hiển thị nguồn thông tin đăng nhập đang hoạt động
+# GitHub Releases có archive theo nền tảng:
+# https://github.com/Hmbown/CodeWhale/releases
-export DEEPSEEK_API_KEY="YOUR_KEY" # cách thiết lập qua biến môi trường thay thế; sử dụng ~/.zshenv cho terminal không tương tác
+# Nếu GitHub không ổn định, dùng CNB mirror:
+cargo install --git https://cnb.cool/codewhale.net/codewhale --tag v0.8.54 codewhale-cli --locked --force
+cargo install --git https://cnb.cool/codewhale.net/codewhale --tag v0.8.54 codewhale-tui --locked --force
+
+# Homebrew legacy trong lúc formula vẫn dùng tên deepseek-tui
+brew tap Hmbown/deepseek-tui
+brew install deepseek-tui
+```
+
+Wrapper npm `codewhale` cho v0.8.54 được hoãn có chủ ý trong lúc đường phát hành release asset được gia cố. Với bản này, hãy dùng Cargo, GitHub Releases hoặc CNB.
+
+Docker, tải trực tiếp, mirror Trung Quốc, Windows/Scoop, Nix, checksum và troubleshooting nằm trong [docs/INSTALL.md](docs/INSTALL.md).
+
+## Lần chạy đầu tiên
+
+```bash
+codewhale auth set --provider deepseek
+codewhale auth status
+codewhale doctor
codewhale
-
-codewhale doctor # kiểm tra và xác minh thiết lập
```
-Nếu lệnh `codewhale doctor` báo lỗi API key bị từ chối đến từ biến môi trường `DEEPSEEK_API_KEY`, hãy xóa cấu hình xuất biến môi trường cũ trong tệp khởi chạy shell của bạn, mở một shell mới hoặc chạy lệnh `codewhale auth set --provider deepseek`. Sử dụng `codewhale auth status` để xem trạng thái của cấu hình, keyring hệ thống và biến môi trường mà không hiển thị trực tiếp khóa API. Các khóa lưu trong file cấu hình sẽ được ưu tiên cao hơn keyring và môi trường để dễ dàng thay đổi khi cần.
+Các lệnh trong TUI thường dùng: `/provider`, `/model`, `/config`, `/statusline`, `/skills`, `/restore`. Bắt đầu dòng bằng `!` để chạy lệnh Shell qua cơ chế approval và sandbox bình thường.
-> Để thay đổi hoặc xóa khóa đã lưu: `codewhale auth clear --provider deepseek`.
+## Tài liệu chi tiết
-### Tencent Cloud / CNB Remote-First Path
+README chỉ giữ ý tưởng và đường đi nhanh nhất. Chi tiết nằm trong docs và [codewhale.net](https://codewhale.net/):
-Đối với không gian làm việc luôn trực tuyến mà bạn có thể điều khiển từ điện thoại, hãy sử dụng đường dẫn gốc của Tencent: CNB mirror/source, Tencent Lighthouse HK, cầu kết nối dài hạn Feishu/Lark, và EdgeOne tùy chọn cho một cổng HTTPS công cộng có kiểm soát. API runtime luôn được giới hạn chạy tại localhost; EdgeOne không được sử dụng để hiển thị công khai đường dẫn `/v1/*`.
+- [User guide](docs/GUIDE.md)
+- [Install guide](docs/INSTALL.md)
+- [Configuration](docs/CONFIGURATION.md)
+- [Provider registry](docs/PROVIDERS.md)
+- [Sub-agents](docs/SUBAGENTS.md)
+- [Runtime API](docs/RUNTIME_API.md)
+- [Model Lab](docs/MODEL_LAB.md)
+- [Architecture](docs/ARCHITECTURE.md)
+- [v0.9.0 release acceptance](docs/V0_9_0_RELEASE_ACCEPTANCE.md)
-Bắt đầu với tài liệu [docs/TENCENT_CLOUD_REMOTE_FIRST.md](docs/TENCENT_CLOUD_REMOTE_FIRST.md), sau đó xem thêm tài liệu [docs/TENCENT_LIGHTHOUSE_HK.md](docs/TENCENT_LIGHTHOUSE_HK.md) để biết các vận hành máy chủ.
+## Track v0.9.0
-### Chế độ Tự động (Auto Mode)
-
-Sử dụng `codewhale --model auto` hoặc gõ lệnh `/model auto` khi bạn muốn hệ thống tự động quyết định sức mạnh của mô hình và cấp độ suy nghĩ cần thiết cho mỗi lượt.
-
-Chế độ tự động điều khiển hai cài đặt cùng nhau:
-
-- Mô hình: `deepseek-v4-flash` hoặc `deepseek-v4-pro`
-- Cấp độ suy nghĩ: `off`, `high`, hoặc `max`
-
-Trước khi lượt gửi chính thức được thực hiện, ứng dụng sẽ thực hiện một cuộc gọi định tuyến nhỏ thông qua mô hình `deepseek-v4-flash` tắt chế độ suy nghĩ. Trình định tuyến đó sẽ đánh giá yêu cầu mới nhất và ngữ cảnh gần đây, từ đó chọn mô hình cụ thể và cấp độ suy nghĩ phù hợp cho lượt gọi thực tế. Các lượt tương tác ngắn/đơn giản sẽ được chạy trên mô hình Flash tắt suy nghĩ; các công việc lập trình phức tạp, gỡ lỗi, phát hành, kiến trúc phần mềm, kiểm tra bảo mật hoặc các tác vụ nhiều bước mơ hồ sẽ được đẩy lên mô hình Pro với cấp độ suy nghĩ cao hơn.
-
-Cơ chế `auto` hoạt động hoàn toàn cục bộ trên máy của bạn. API ở máy chủ upstream không bao giờ nhận được chuỗi `model: "auto"`; nó luôn nhận được mô hình cụ thể và cấu hình suy nghĩ đã được chọn cho lượt chạy đó. Giao diện TUI hiển thị tuyến đường định tuyến được chọn và bộ theo dõi chi phí sẽ tính tiền cho mô hình thực tế đã chạy. Nếu cuộc gọi định tuyến thất bại hoặc trả về câu trả lời không hợp lệ, ứng dụng sẽ chuyển sang thuật toán phỏng đoán cục bộ. Các sub-agent con sẽ kế thừa chế độ tự động này trừ khi bạn chỉ định rõ một mô hình cho chúng.
-
-Hãy chỉ định mô hình hoặc cấp độ suy nghĩ cố định nếu bạn muốn chạy benchmark lặp lại nhất quán, kiểm soát nghiêm ngặt chi phí trần hoặc có cấu hình ánh xạ nhà cung cấp/mô hình tùy chỉnh cụ thể.
-
-### Linux ARM64 (Raspberry Pi, Asahi, Graviton, HarmonyOS PC)
-
-Lệnh cài đặt `npm i -g codewhale` hoạt động trên môi trường Linux ARM64 nền glibc từ phiên bản v0.8.8 trở đi. Bạn cũng có thể tải trực tiếp các tệp binary dựng sẵn từ [trang phát hành Releases](https://github.com/Hmbown/CodeWhale/releases) và đặt chúng cạnh nhau trong một thư mục thuộc biến `PATH`.
-
-Xem [docs/HarmonyOS.md](docs/HarmonyOS.md) để cấu hình HarmonyOS PC và cross-build OpenHarmony.
-
-### Cài đặt thân thiện qua Mirror (Tại Trung Quốc)
-
-Nếu việc tải xuống từ GitHub hoặc npm bị chậm từ Trung Quốc đại lục, bạn hãy sử dụng mirror registry cho Cargo:
-
-```toml
-# ~/.cargo/config.toml
-[source.crates-io]
-replace-with = "tuna"
-
-[source.tuna]
-registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"
-```
-
-Sau đó cài đặt cả hai binary (trình điều phối sẽ ủy quyền cho TUI tại thời điểm chạy):
-
-```bash
-cargo install codewhale-cli --locked # cung cấp lệnh `codewhale`
-cargo install codewhale-tui --locked # cung cấp giao diện `codewhale-tui`
-codewhale --version
-```
-
-Các binary dựng sẵn cũng có thể được tải từ [GitHub Releases](https://github.com/Hmbown/CodeWhale/releases). Thiết lập biến `DEEPSEEK_TUI_RELEASE_BASE_URL` để sử dụng mirror tải các tệp tài nguyên phát hành.
-
-### Windows (Scoop)
-
-[Scoop](https://scoop.sh) là một trình quản lý gói phổ biến trên Windows. Gói `codewhale` đã được liệt kê trong bucket chính của Scoop, tuy nhiên gói cài đặt này hoạt động độc lập và đôi khi cập nhật chậm hơn các bản phát hành chính thức trên GitHub/npm/Cargo. Chạy lệnh `scoop update` trước, sau đó xác minh phiên bản đã cài bằng `codewhale --version`:
-
-```bash
-scoop update
-scoop install codewhale
-codewhale --version
-```
-
-Vui lòng sử dụng phương pháp npm hoặc tải trực tiếp từ GitHub Releases nếu bạn muốn trải nghiệm phiên bản mới nhất trước khi Scoop cập nhật.
-
-
-Cài đặt từ mã nguồn
-
-Cách này hoạt động trên bất kỳ kiến trúc mục tiêu Tier-1 nào được Rust hỗ trợ — bao gồm cả musl, riscv64, FreeBSD và các bản phân phối ARM64 Linux cũ.
-
-```bash
-# Các thư viện phụ thuộc để build trên Linux (Debian/Ubuntu/RHEL):
-# sudo apt-get install -y build-essential pkg-config libdbus-1-dev
-# sudo dnf install -y gcc make pkgconf-pkg-config dbus-devel
-
-git clone https://github.com/Hmbown/CodeWhale.git
-cd CodeWhale
-
-cargo install --path crates/cli --locked # yêu cầu Rust 1.88+; cung cấp `codewhale`
-cargo install --path crates/tui --locked # cung cấp giao diện `codewhale-tui`
-```
-
-Cả hai tệp binary đều bắt buộc phải cài đặt. Xem hướng dẫn biên dịch chéo và ghi chú riêng theo nền tảng tại: [docs/INSTALL.md](docs/INSTALL.md).
-
-
-
-### Các Nhà Cung Cấp API Khác
-
-Để xem danh sách đầy đủ tất cả các nhà cung cấp được hỗ trợ chính thức, bao gồm mã định danh mô hình, biến xác thực, URL cơ sở và ranh giới tính năng, xem thêm tài liệu [docs/PROVIDERS.md](docs/PROVIDERS.md).
-
-```bash
-# NVIDIA NIM
-codewhale auth set --provider nvidia-nim --api-key "YOUR_NVIDIA_API_KEY"
-codewhale --provider nvidia-nim
-
-# AtlasCloud
-codewhale auth set --provider atlascloud --api-key "YOUR_ATLASCLOUD_API_KEY"
-codewhale --provider atlascloud
-
-# Wanjie Ark
-codewhale auth set --provider wanjie-ark --api-key "YOUR_WANJIE_API_KEY"
-codewhale --provider wanjie-ark --model deepseek-reasoner
-
-# OpenRouter
-codewhale auth set --provider openrouter --api-key "YOUR_OPENROUTER_API_KEY"
-codewhale --provider openrouter --model deepseek/deepseek-v4-pro
-
-# Novita
-codewhale auth set --provider novita --api-key "YOUR_NOVITA_API_KEY"
-codewhale --provider novita --model deepseek/deepseek-v4-pro
-
-# Fireworks
-codewhale auth set --provider fireworks --api-key "YOUR_FIREWORKS_API_KEY"
-codewhale --provider fireworks --model deepseek-v4-pro
-
-# Các endpoint tương thích định dạng OpenAI chung
-codewhale auth set --provider openai --api-key "YOUR_OPENAI_COMPATIBLE_API_KEY"
-OPENAI_BASE_URL="https://openai-compatible.example/v4" codewhale --provider openai --model glm-5
-
-# Tự host bằng SGLang
-SGLANG_BASE_URL="http://localhost:30000/v1" codewhale --provider sglang --model deepseek-v4-flash
-
-# Tự host bằng vLLM
-VLLM_BASE_URL="http://localhost:8000/v1" codewhale --provider vllm --model deepseek-v4-flash
-# Sử dụng vLLM qua kết nối HTTP trong mạng LAN đáng tin cậy
-DEEPSEEK_ALLOW_INSECURE_HTTP=1 VLLM_BASE_URL="http://192.168.0.110:8000/v1" codewhale --provider vllm --model deepseek-v4-flash
-
-# Tự host bằng Ollama
-ollama pull codewhale-coder:1.3b
-codewhale --provider ollama --model codewhale-coder:1.3b
-
-# Hugging Face Inference Providers
-codewhale auth set --provider huggingface --api-key "YOUR_HF_TOKEN"
-codewhale --provider huggingface --model deepseek-ai/DeepSeek-V4-Pro
-```
-
-Bên trong giao diện TUI, lệnh `/provider` mở bảng chọn nhà cung cấp và `/model` mở bảng chọn mô hình/cấp độ suy nghĩ cục bộ. Lệnh `/provider openrouter` và `/model ` chuyển đổi trực tiếp, trong khi lệnh `/models` sẽ truy vấn trực tiếp và hiển thị danh sách các mô hình API trực tuyến từ nhà cung cấp (nếu nhà cung cấp hỗ trợ tính năng liệt kê mô hình).
-
----
-
-## Nhật ký thay đổi (Release Notes)
-
-Chi tiết thay đổi giữa các phiên bản được cập nhật tại [CHANGELOG.md](CHANGELOG.md). File README này chỉ tập trung vào các đường dẫn cài đặt hiện tại, quy trình làm việc cốt lõi, thiết lập nhà cung cấp API, giao diện và các điểm mở rộng tính năng của dự án.
-
----
-
-## Cách sử dụng
-
-```bash
-codewhale # giao diện tương tác TUI chính
-codewhale "explain this function" # thực thi prompt nhanh một lượt
-codewhale exec --auto --output-format stream-json "fix this bug" # truyền phát luồng dữ liệu NDJSON backend
-codewhale exec --resume "follow up" # tiếp tục phiên làm việc không tương tác cũ
-codewhale --model deepseek-v4-flash "summarize" # ghi đè mô hình chạy chỉ định
-codewhale --model auto "fix this bug" # tự động chọn mô hình và cấp độ suy nghĩ thích hợp
-codewhale --yolo # tự động phê duyệt chạy các công cụ
-codewhale auth set --provider deepseek # lưu trữ API key
-codewhale doctor # tự động kiểm tra cài đặt và kết nối mạng
-codewhale doctor --json # trả về chuẩn đoán định dạng máy đọc được
-codewhale setup --status # chỉ đọc trạng thái thiết lập hiện tại
-codewhale setup --tools --plugins # tạo sẵn cấu trúc thư mục tool/plugin
-codewhale models # liệt kê các mô hình khả dụng trực tuyến
-codewhale sessions # liệt kê các phiên làm việc đã lưu
-codewhale resume --last # tiếp tục phiên làm việc gần nhất trong thư mục này
-codewhale resume # tiếp tục một phiên làm việc cụ thể theo mã UUID
-codewhale fork # tạo một nhánh (fork) phiên làm việc đã lưu sang đường dẫn mới
-codewhale serve --http # khởi chạy máy chủ API định dạng HTTP/SSE
-codewhale serve --acp # khởi chạy adapter ACP qua stdio cho trình soạn thảo Zed/agent tùy chỉnh
-codewhale run pr # tải PR về và nạp sẵn vào prompt đánh giá
-codewhale mcp list # liệt kê các máy chủ MCP đã cấu hình
-codewhale mcp validate # kiểm tra cấu hình và kết nối máy chủ MCP
-codewhale mcp-server # khởi chạy máy chủ MCP điều phối qua cổng stdio
-codewhale update # kiểm tra và cài đặt phiên bản binary mới nhất
-```
-
-### Tạo nhánh phiên làm việc (Branching)
-
-Các phiên làm việc được lưu có thể được phân nhánh một cách có chủ đích. Lệnh `codewhale fork ` sao chép toàn bộ phiên làm việc cũ sang một phiên mới song song, lưu trữ mã ID của phiên cha trong siêu dữ liệu (metadata) và mở phiên fork đó ra để bạn có thể thử nghiệm hướng phát triển mới mà không làm ảnh hưởng đến lịch sử phiên làm việc gốc. Trình chọn phiên làm việc và danh sách `codewhale sessions` sẽ đánh dấu rõ ràng các phiên được fork kèm theo mã ID của phiên cha.
-
-Bên trong giao diện TUI, bạn có thể nhấn phím `Esc` hai lần (`Esc-Esc`) để quay ngược lại transcript và đưa prompt cũ về lại phần soạn thảo để chỉnh sửa lại nội dung. Các lệnh `/restore` và `revert_turn` là công cụ khôi phục workspace độc lập: chúng khôi phục lại các tệp tin dựa trên ảnh chụp nhanh side-git nhưng không làm thay đổi hay ghi đè lịch sử trò chuyện của phiên làm việc.
-
-Các hình ảnh Docker được phát hành lên GHCR cho các bản dựng phát hành chính thức:
-
-```bash
-docker volume create codewhale-home
-
-docker run --rm -it \
- -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
- -v codewhale-home:/home/codewhale/.codewhale \
- -v "$PWD:/workspace" \
- -w /workspace \
- ghcr.io/hmbown/codewhale:latest
-```
-
-Xem tài liệu [docs/DOCKER.md](docs/DOCKER.md) để biết thêm thông tin về thẻ phiên bản (pinned tags), cách tự dựng image cục bộ, lưu ý quyền sở hữu volume và cách sử dụng cho pipeline không tương tác.
-
-### Zed / ACP
-
-DeepSeek có thể chạy dưới dạng một máy chủ Agent Client Protocol (ACP) cục bộ cho các trình soạn thảo mã nguồn hỗ trợ giao tiếp ACP qua cổng stdio. Trong trình soạn thảo Zed, bạn hãy thêm cấu hình máy chủ agent tùy chỉnh sau:
-
-```json
-{
- "agent_servers": {
- "DeepSeek": {
- "type": "custom",
- "command": "codewhale",
- "args": ["serve", "--acp"],
- "env": {}
- }
- }
-}
-```
-
-Phân hệ ACP ban đầu hỗ trợ khởi tạo phiên làm việc mới và nhận phản hồi prompt qua cấu hình và API key hiện tại của DeepSeek. Tính năng chỉnh sửa tích hợp công cụ và phát lại checkpoint hiện chưa được hỗ trợ qua giao diện ACP.
-
-Adapter do cộng đồng phát triển: [acp-codewhale-adapter](https://github.com/rockeverm3m/acp-codewhale-adapter) hỗ trợ cầu nối lệnh `codewhale exec --auto` với `cc-connect` cho người dùng cần quy trình làm việc ACP có tích hợp công cụ bên ngoài trình soạn thảo Zed.
-
-### Phím Tắt Tiêu Biểu
-
-| Phím | Hành động |
-|---|---|
-| `Tab` | Hoàn thành gợi ý lệnh `/` hoặc các nhãn tệp `@`; khi đang chạy, xếp tin nhắn nháp vào hàng đợi chạy tiếp theo; hoặc chuyển đổi qua lại giữa các chế độ |
-| `Shift+Tab` | Thay đổi nhanh cấp độ suy nghĩ: off → high → max |
-| `F1` | Mở màn hình trợ giúp phím tắt có thanh tìm kiếm |
-| `Esc` | Quay lại / đóng cửa sổ popup |
-| `Ctrl+K` | Mở bảng lệnh nhanh (Command palette) |
-| `Ctrl+R` | Tiếp tục một phiên làm việc cũ |
-| `Alt+R` | Tìm kiếm lịch sử prompt cũ để khôi phục tin nháp đã xóa |
-| `Ctrl+S` | Cất tin nháp hiện tại vào bộ nhớ tạm (dùng `/stash list`, `/stash pop` để lấy lại) |
-| `@path` | Đính kèm ngữ cảnh file hoặc thư mục trực tiếp tại trình soạn thảo văn bản |
-| `↑` (tại đầu composer) | Chọn hàng tệp tin đính kèm để xóa |
-
-Xem danh sách phím tắt đầy đủ tại: [docs/KEYBINDINGS.md](docs/KEYBINDINGS.md).
-
----
-
-## Chế độ hoạt động (Modes)
-
-| Chế độ | Hành vi hoạt động |
-| --- | --- |
-| **Plan** 🔍 | Chế độ khảo sát chỉ đọc — mô hình tìm hiểu cấu trúc và đề xuất kế hoạch hành động cụ thể trước khi sửa đổi file; các cuộc khảo sát nhiều bước sử dụng công cụ `checklist_write` |
-| **Agent** 🤖 | Chế độ tương tác mặc định — thực thi tác vụ nhiều bước có kiểm soát đằng sau các cổng phê duyệt; các tác vụ lớn sẽ được theo dõi qua `checklist_write` |
-| **YOLO** ⚡ | Tự động phê duyệt tất cả các lệnh gọi công cụ trong các workspace tin cậy; các tác vụ nhiều bước vẫn duy trì checklist hiển thị trực quan |
-
----
-
-## Cấu hình
-
-Cấu hình của người dùng lưu tại: `~/.codewhale/config.toml` (tự động fallback về tệp cũ `~/.deepseek/config.toml` nếu có). Cấu hình riêng của dự án ghi đè tại: `/.codewhale/config.toml` (hoặc `/.deepseek/config.toml`) (lưu ý các trường sau bị cấm ghi đè ở cấp dự án: `api_key`, `base_url`, `provider`, `mcp_config_path`). Tham khảo tệp [config.example.toml](config.example.toml) để xem đầy đủ tất cả cấu hình mẫu.
-
-Các biến môi trường chính:
-
-| Biến môi trường | Mục đích sử dụng |
-|---|---|
-| `DEEPSEEK_API_KEY` | Khóa API key chính |
-| `DEEPSEEK_BASE_URL` | Địa chỉ URL cơ sở của máy chủ API |
-| `DEEPSEEK_HTTP_HEADERS` | Các header tùy chỉnh gửi kèm yêu cầu API, ví dụ `X-Model-Provider-Id=your-model-provider` |
-| `DEEPSEEK_MODEL` | Mô hình mặc định |
-| `DEEPSEEK_STREAM_IDLE_TIMEOUT_SECS` | Thời gian chờ tối đa khi stream bị rảnh (giây), mặc định là `300`, giới hạn trong khoảng `1..=3600` |
-| `CODEWHALE_PROVIDER` / `DEEPSEEK_PROVIDER` | Các nhà cung cấp: `deepseek` (mặc định), `nvidia-nim`, `openai`, `atlascloud`, `wanjie-ark`, `volcengine`, `openrouter`, `xiaomi-mimo`, `novita`, `fireworks`, `siliconflow`, `moonshot`, `sglang`, `vllm`, `ollama`, `huggingface` |
-| `DEEPSEEK_PROFILE` | Tên cấu hình profile sử dụng |
-| `DEEPSEEK_MEMORY` | Thiết lập là `on` để kích hoạt tính năng tự ghi nhớ thông tin người dùng |
-| `DEEPSEEK_ALLOW_INSECURE_HTTP=1` | Cho phép sử dụng các đường dẫn API dạng `http://` không mã hóa trong các mạng LAN tin cậy |
-| `NVIDIA_API_KEY` / `OPENAI_API_KEY` / `ATLASCLOUD_API_KEY` / `WANJIE_ARK_API_KEY` / `VOLCENGINE_API_KEY` / `ARK_API_KEY` / `OPENROUTER_API_KEY` / `XIAOMI_MIMO_API_KEY` / `MIMO_API_KEY` / `NOVITA_API_KEY` / `FIREWORKS_API_KEY` / `SILICONFLOW_API_KEY` / `MOONSHOT_API_KEY` / `KIMI_API_KEY` / `SGLANG_API_KEY` / `VLLM_API_KEY` / `OLLAMA_API_KEY` | Thông tin đăng nhập theo từng nhà cung cấp tương ứng |
-| `OPENAI_BASE_URL` / `OPENAI_MODEL` | Điểm cuối (endpoint) và mã mô hình cho nhà cung cấp tương thích định dạng OpenAI chung |
-| `ATLASCLOUD_BASE_URL` / `ATLASCLOUD_MODEL` | Endpoint và mô hình ghi đè cho AtlasCloud |
-| `WANJIE_ARK_BASE_URL` / `WANJIE_ARK_MODEL` | Endpoint và mô hình ghi đè cho Wanjie Ark |
-| `VOLCENGINE_BASE_URL` / `ARK_BASE_URL` / `VOLCENGINE_MODEL` / `ARK_MODEL` | Endpoint và mô hình ghi đè cho Volcengine Ark |
-| `OPENROUTER_BASE_URL` | Endpoint ghi đè cho OpenRouter |
-| `XIAOMI_MIMO_BASE_URL` / `MIMO_BASE_URL` / `XIAOMI_MIMO_MODEL` / `MIMO_MODEL` | Endpoint và mô hình ghi đè cho Xiaomi MiMo |
-| `NOVITA_BASE_URL` | Endpoint ghi đè cho Novita |
-| `FIREWORKS_BASE_URL` | Endpoint ghi đè cho Fireworks |
-| `SILICONFLOW_BASE_URL` / `SILICONFLOW_MODEL` | Endpoint và mô hình ghi đè cho SiliconFlow |
-| `MOONSHOT_BASE_URL` / `MOONSHOT_MODEL` / `KIMI_BASE_URL` / `KIMI_MODEL` | Endpoint và mô hình ghi đè cho Moonshot/Kimi |
-| `SGLANG_BASE_URL` | Endpoint cho máy chủ SGLang tự host |
-| `SGLANG_MODEL` | Mã mô hình cho máy chủ SGLang tự host |
-| `VLLM_BASE_URL` | Endpoint cho máy chủ vLLM tự host |
-| `VLLM_MODEL` | Mã mô hình cho máy chủ vLLM tự host |
-| `OLLAMA_BASE_URL` | Endpoint cho máy chủ Ollama tự host |
-| `OLLAMA_MODEL` | Thẻ mô hình (model tag) cho máy chủ Ollama tự host |
-| `HUGGINGFACE_API_KEY` / `HF_TOKEN` | Xác thực Hugging Face |
-| `HUGGINGFACE_BASE_URL` / `HUGGINGFACE_MODEL` | Ghi đè endpoint và mô hình Hugging Face |
-| `NO_ANIMATIONS=1` | Bắt buộc chạy ở chế độ hỗ trợ khả năng tiếp cận (Accessibility mode), tắt hiệu ứng khi khởi động |
-| `SSL_CERT_FILE` | Đường dẫn file CA bundle tùy chỉnh khi sử dụng proxy nội bộ doanh nghiệp |
-
-Thiết lập thuộc tính `locale` trong file `settings.toml`, sử dụng lệnh `/config locale vi`, hoặc dựa vào cài đặt biến `LC_ALL`/`LANG` của hệ điều hành để lựa chọn ngôn ngữ cho giao diện TUI và ngôn ngữ nhắc nhở gửi kèm tới các mô hình V4. Tin nhắn mới nhất của người dùng vẫn có mức độ ưu tiên cao nhất để mô hình tự động chọn ngôn ngữ phản hồi tương ứng, do đó các câu hỏi bằng Tiếng Việt của người dùng vẫn sẽ luôn nhận được câu trả lời bằng Tiếng Việt ngay cả khi hệ điều hành đang thiết lập giao diện hiển thị mặc định bằng tiếng Anh. Xem tài liệu hướng dẫn cấu hình tại [docs/CONFIGURATION.md](docs/CONFIGURATION.md) và [docs/MCP.md](docs/MCP.md).
-
----
-
-## Mô hình & Giá cả
-
-| Mô hình | Ngữ cảnh | Đầu vào (Hit Cache) | Đầu vào (Miss Cache) | Đầu ra |
-|---|---|---|---|---|
-| `deepseek-v4-pro` | 1M | $0.003625 / 1M | $0.435 / 1M | $0.87 / 1M |
-| `deepseek-v4-flash` | 1M | $0.0028 / 1M | $0.14 / 1M | $0.28 / 1M |
-
-Nền tảng DeepSeek mặc định sử dụng đường dẫn `https://api.deepseek.com/beta` để bạn có thể trải nghiệm các tính năng API beta mà không cần thiết lập cấu hình phức tạp. Thiết lập thuộc tính `base_url = "https://api.deepseek.com"` nếu muốn tắt tính năng này.
-
-Các tên định danh cũ `deepseek-chat` / `deepseek-reasoner` sẽ được tự động ánh xạ đến `deepseek-v4-flash` và sẽ chính thức dừng hoạt động sau ngày 24 tháng 7 năm 2026. Các biến thể NVIDIA NIM sẽ áp dụng theo điều khoản tài khoản NVIDIA của bạn.
-
-> [!Note]
-> Trang cấu trúc giá của DeepSeek hiện đã cập nhật bảng giá trên của dòng V4 Pro làm mức giá cố định vĩnh viễn: Chương trình khuyến mãi giảm giá 75% trước đó đã được chính thức tích hợp thẳng vào giá cơ sở từ sau khi thời hạn khuyến mãi kết thúc vào lúc 15:59 UTC ngày 31 tháng 5 năm 2026. Trình tính toán chi phí trên giao diện TUI của CodeWhale đã cập nhật các giá trị mới này, do đó bạn không cần thực hiện thêm thay đổi nào. Để theo dõi các thay đổi giá trong tương lai, vui lòng tham khảo [trang giá chính thức của DeepSeek](https://api-docs.deepseek.com/zh-cn/quick_start/pricing).
-
----
-
-## Chia Sẻ Skill Tự Viết
-
-CodeWhale sẽ tự động quét và tìm kiếm các skill được định nghĩa từ các thư mục của dự án (`.agents/skills` → `skills` → `.opencode/skills` → `.claude/skills` → `.cursor/skills`) và các thư mục cấu hình toàn cục (`~/.agents/skills` → `~/.claude/skills` → `~/.codewhale/skills` → `~/.deepseek/skills`). Mỗi skill là một thư mục chứa một tệp tin `SKILL.md`:
-
-```text
-~/.agents/skills/my-skill/
-└── SKILL.md
-```
-
-Yêu cầu định nghĩa phần Frontmatter ở đầu file:
-
-```markdown
----
-name: my-skill
-description: Sử dụng skill này khi bạn muốn DeepSeek tuân thủ theo quy trình làm việc tùy chỉnh của tôi.
----
-
-# My Skill
-Các hướng dẫn chi tiết dành cho agent được viết tại đây.
-```
-
-Các lệnh tương tác: `/skills` (liệt kê), `/skill ` (kích hoạt), `/skill new` (tạo khung mẫu), `/skill install github:/` (cài đặt từ cộng đồng GitHub), `/skill update` / `uninstall` / `trust` để quản lý. Cài đặt các skill từ cộng đồng GitHub không yêu cầu chạy thêm bất kỳ dịch vụ nền nào. Các skill sau khi cài đặt sẽ hiển thị trong phần ngữ cảnh phiên làm việc mà mô hình AI có thể đọc được; agent có thể tự chọn skill phù hợp qua công cụ `load_skill` khi nhiệm vụ của bạn khớp với phần mô tả của skill.
-
-Trong lần chạy đầu tiên, chương trình cũng tự động cài đặt sẵn một số skill hệ thống cho các quy trình phổ biến:
-`skill-creator`, `delegate`, `v4-best-practices`, `plugin-creator`, `skill-installer`, `mcp-builder`, `documents`, `presentations`, `spreadsheets`, `pdf`, và `feishu`. Các skill này nằm trong thư mục `~/.codewhale/skills` (hoặc thư mục cũ `~/.deepseek/skills`) và được quản lý phiên bản để các bản nâng cấp mới được cài đặt tự động mà không làm ảnh hưởng đến các skill do người dùng tự chủ động xóa trước đó.
-
----
-
-## Tài liệu hướng dẫn
-
-| Tài liệu | Chủ đề chi tiết |
-|---|---|
-| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | Cấu trúc bên trong của cơ sở mã nguồn |
-| [CONFIGURATION.md](docs/CONFIGURATION.md) | Hướng dẫn cấu hình chi tiết và đầy đủ nhất |
-| [MODES.md](docs/MODES.md) | Các chế độ hoạt động: Plan / Agent / YOLO |
-| [MCP.md](docs/MCP.md) | Tích hợp giao thức Model Context Protocol |
-| [RUNTIME_API.md](docs/RUNTIME_API.md) | Hướng dẫn sử dụng máy chủ API HTTP/SSE |
-| [INSTALL.md](docs/INSTALL.md) | Hướng dẫn cài đặt riêng theo từng nền tảng |
-| [DOCKER.md](docs/DOCKER.md) | Sử dụng Docker image trên GHCR, volume lưu trữ |
-| [CNB_MIRROR.md](docs/CNB_MIRROR.md) | CNB mirror và các lưu ý cài đặt tại Trung Quốc |
-| [TENCENT_CLOUD_REMOTE_FIRST.md](docs/TENCENT_CLOUD_REMOTE_FIRST.md) | Hướng dẫn kết nối Tencent/CNB/Lighthouse/Feishu từ xa |
-| [TENCENT_LIGHTHOUSE_HK.md](docs/TENCENT_LIGHTHOUSE_HK.md) | Thiết lập máy chủ Lighthouse Hồng Kông |
-| [MEMORY.md](docs/MEMORY.md) | Hướng dẫn tính năng tự ghi nhớ thông tin người dùng |
-| [SUBAGENTS.md](docs/SUBAGENTS.md) | Phân loại vai trò và vòng đời của các sub-agent con |
-| [KEYBINDINGS.md](docs/KEYBINDINGS.md) | Danh sách phím tắt đầy đủ |
-| [RELEASE_RUNBOOK.md](docs/RELEASE_RUNBOOK.md) | Quy trình đóng gói và phát hành phiên bản mới |
-| [LOCALIZATION.md](docs/LOCALIZATION.md) | Ma trận đa ngôn ngữ giao diện & cách chuyển đổi |
-| [OPERATIONS_RUNBOOK.md](docs/OPERATIONS_RUNBOOK.md) | Vận hành và phục hồi hệ thống |
-
-Lịch sử cập nhật chi tiết: [CHANGELOG.md](CHANGELOG.md).
-
----
+v0.9.0 vẫn là nhánh tích hợp, chưa phải release công khai cho đến khi tag, GitHub Release, npm, Cargo và artifact phát hành thật sự được tạo và kiểm chứng. Trọng tâm hiện tại: relay/handoff, transcript gọn hơn, kiến trúc command/provider, Runtime API cho VS Code/GUI, HarnessProfile, WhaleFlow và credit hygiene cho cộng đồng đóng góp.
## Lời cảm ơn
diff --git a/README.zh-CN.md b/README.zh-CN.md
index dc2148cb..2e37f7da 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,545 +1,88 @@
# CodeWhale
-> **面向 [DeepSeek V4](https://platform.deepseek.com) 的终端原生编程智能体:100 万 token 上下文、思考模式流式推理、前缀缓存感知。以 `codewhale` 调度器和 `codewhale-tui` 运行时这一组自包含 Rust 二进制发布——开箱即带 MCP 客户端、沙箱和持久化任务队列。**
+> 面向 DeepSeek V4 和开放模型的本地 Agent 运行框架:自我、权威、证据闭环。
-[English README](README.md)
-[日本語 README](README.ja-JP.md)
-[Tiếng Việt README](README.vi.md)
+[English README](README.md) · [日本語 README](README.ja-JP.md) · [Tiếng Việt README](README.vi.md)
+
+
+## 核心想法
+
+多数编程 Agent 从“更强”开始:更多工具、更长上下文、更多自动化。CodeWhale 从责任开始。
+
+Agent 改仓库前,先要有一个地址:这个终端、这个用户、这个分支、这个会话。这就是 ego 层。不是炫耀,而是连续性;不是人格面具,而是责任落点。
+
+然后它需要法律。真实工作区是一组冲突来源:用户当前意图、仓库规则、Shell 输出、旧记忆、上一次交接、安全策略和未完成改动都会挤在同一轮里。CodeWhale 用 Constitution 给这些来源排出顺序:当前用户请求高于旧上下文;实时证据高于假设;验证高于自信;个性只影响语气,不决定行为。
+
+CodeWhale 的产品本质是模型外面的排序层:谁在行动、听谁的 law、有什么证据,以及下一个人或 Agent 如何继续。
+
+## 已经具备的能力
+
+- 本地优先的终端 TUI;
+- 文件、Shell、Git、Web、MCP、RLM、子 Agent 等带 schema 的工具;
+- 审批门、沙箱、side-git 快照和 `/restore` 回滚;
+- 编辑后的语言服务器诊断反馈;
+- 并发子 Agent、持久会话、fork、relay 交接和运行时 API;
+- DeepSeek V4 一等支持,同时保留 OpenRouter、Xiaomi MiMo、NVIDIA NIM、Arcee、SiliconFlow、Fireworks、Novita、自托管 SGLang/vLLM、Ollama 等显式 provider 路由。
+
+DeepSeek 是一等路径,不是唯一边界。provider、model、base URL 和凭据是分开的选择。
## 安装
-`codewhale` 以一组自包含 Rust 发布二进制安装:`codewhale` 调度器命令,
-以及它在交互会话中启动的同级 `codewhale-tui` 运行时。npm 和 Docker
-会自动安装这两个二进制;Cargo 或手动下载时必须把两者放在同一目录
-(通常是 `PATH` 上的某个目录)。运行时不依赖 Node.js 或 Python。
-
```bash
-# 1. npm —— 已装 Node 的最方便方式。npm 包只是一个下载器,
-# 会从 GitHub Releases 拉取对应平台的预编译二进制对,
-# 并不会让 codewhale 本身依赖 Node 运行时。
-npm install -g codewhale
-
-# 2. Cargo —— 无需 Node,两个 crate 都要安装。
-cargo install codewhale-cli --locked # `codewhale` 入口
-cargo install codewhale-tui --locked # `codewhale-tui` TUI 二进制
-
-# 3. Homebrew —— 仅用于旧安装兼容。
-# tap/formula 仍使用旧的 deepseek-tui 名称。新安装请优先使用
-# npm、Cargo、Docker 或直接下载,直到 formula 完成改名。
-brew tap Hmbown/deepseek-tui
-brew install deepseek-tui
-
-# 4. 直接下载 —— GitHub Releases 的平台压缩包。
-# https://github.com/Hmbown/CodeWhale/releases
-# 压缩包包含 codewhale 和 codewhale-tui 以及安装脚本;
-# 也提供单独二进制给脚本使用,手动安装时请把这一对放在一起。
-
-# 5. Docker —— 预构建发布镜像。
-docker volume create codewhale-home
-docker run --rm -it \
- -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
- -v codewhale-home:/home/codewhale/.codewhale \
- -v "$PWD:/workspace" \
- -w /workspace \
- ghcr.io/hmbown/codewhale:latest
-```
-
-> 中国大陆访问较慢时,npm 可加 `--registry=https://registry.npmmirror.com`,
-> 或使用下方的 [Cargo 镜像](#中国大陆--镜像友好安装)。
->
-> 下载安全:官方二进制只发布在
-> `https://github.com/Hmbown/CodeWhale/releases`。手动下载时请校验
-> SHA-256 manifest,并避免相似仓库名或搜索结果里的镜像站。详见
-> [下载安全与校验](docs/INSTALL.md#2-download-safety-and-checksums)。
-
-已经安装过?按你的安装方式更新:
-
-```bash
-codewhale update # release 二进制更新器
-npm install -g codewhale@latest # npm 包装器
-brew update && brew upgrade deepseek-tui # 仅旧 Homebrew 安装
-cargo install codewhale-cli --locked --force
-cargo install codewhale-tui --locked --force
-```
-> codewhale update 现在可添加 --proxy ,通过代理下载更新
-> eg: codewhale update --proxy https://localhost:7897
-
-[](https://github.com/Hmbown/CodeWhale/actions/workflows/ci.yml)
-[](https://www.npmjs.com/package/codewhale)
-[](https://crates.io/crates/codewhale-cli)
-[DeepWiki project index](https://deepwiki.com/Hmbown/CodeWhale)
-
-
-
----
-
-## 这是什么?
-
-模型回答问题。智能体完成任务。区别在于运行框架——一套在模型偏离时保持方向的规则、证据和反馈系统。
-
-CodeWhale 就是这套框架,围绕 DeepSeek V4 构建,基于三个理念:
-
-| 原则 | 如何运作 |
-|---|---|
-| **从信任开始** | 每一轮以"A"开始——可能性先于确定性,匠心先于便利 |
-| **清晰的管辖权** | 成文宪法,九层权威。用户意图优先于陈旧指令。验证优先于自信。 |
-| **递归改进** | V4 参与了框架的编写。框架改进 → V4 更高效 → 进一步改进框架。每轮从更强的位置开始。 |
-
-开源、终端原生,并以 `codewhale` / `codewhale-tui` 这一组 Rust 二进制发布。
-
-## 框架如何工作
-
-智能体模型面临大规模的冲突信息:用户意图、项目规则、系统默认值、工具输出和陈旧记忆在单轮对话中争夺权威。LLM 作为裁判需要管辖权——当它们冲突时,哪个来源胜出?
-
-CodeWhale 用一部**宪法**(`prompts/base.md`)来回答这个问题。它是一个形式化的法律层级——第七条将九个来源从宪法本身的条款排到前序会话的交接记录。用户当前消息优先于陈旧的项目指令。实时工具输出优先于假设。验证优先于自信。模型每轮继承清晰的权威链,永远不需要猜测该服从哪条指令。
-
-七条条款位于层级之上,定义模型的身份、职责和能动性:验证强制(第五条——每个行动留下证据,绝不凭信念宣告成功)、协作遗产(第六条——让工作区对下一位智能体保持可读)、以及真相优先条款(第二条——任何下级规则不得覆盖它)。
-
-DeepSeek V4 的前缀缓存使其可行。宪法篇幅长且详细,但一旦缓存,每轮成本约为冷读取的百分之一。模型递归引用它——通过 RLM 会话窥视、扫描和查询——按需重访信息,而非依赖单次记忆读取。它的表现更像是开卷考试而非闭卷考试。
-
-因为权威结构是显式的,失败不会被隐藏。非零退出码、两次轮次间来自 rust-analyzer 的类型错误、沙箱拒绝——这些被作为修正向量反馈。模型用自己的漂移进行自我校正。
-
-三种模式控制行动空间。Plan 只读。Agent 对破坏性操作设审批门控。YOLO 在可信工作区自动批准。macOS Seatbelt 是主动执行的沙箱;Linux Landlock 可检测但未执行;Windows 沙箱尚未开放。
-
-Fin——关闭思考的廉价 Flash 调用——每轮处理模型自动路由。`--model auto` 是默认值。
-
-每轮记录 side-git 快照,在仓库 `.git` 之外。`/restore` 和 `revert_turn` 即刻回滚工作区。
-
-子智能体并发运行(最多 20 个)。`agent_open` 立即返回;结果以内联完成哨兵形式到达,携带摘要。完整对话记录通过 `agent_eval` 的有界句柄保存。详见 [docs/SUBAGENTS.md](docs/SUBAGENTS.md)。
-
-其余功能面:每次编辑后的 LSP 诊断(rust-analyzer、pyright、typescript-language-server、gopls、clangd、jdtls、vue-language-server)、RLM 会话批量分析、MCP 协议、HTTP/SSE 运行时 API、持久化任务队列、Zed 的 ACP 适配器、SWE-bench 导出、以及带缓存命中/未命中明细的实时成本追踪。
-
----
-
-## 运行框架
-
-`codewhale`(调度器 CLI)→ `codewhale-tui`(伴随二进制)→ ratatui 界面 ↔ 异步引擎 ↔ OpenAI 兼容流式客户端。工具调用通过类型化注册表(shell、文件操作、git、web、子智能体、MCP、RLM)路由,结果流式返回对话记录。引擎管理会话状态、轮次追踪、持久化任务队列和 LSP 子系统——它在下一步推理前将编辑后诊断反馈到模型上下文中。
-
-详见 [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)。
-
-### 子智能体:并发后台执行
-
-codewhale 可以同时调度多个子智能体并行运行——类似于并发任务队列:
-
-- **非阻塞启动。** `agent_open` 立即返回。子智能体获得独立的上下文和工具注册表,独立运行。父进程继续工作。
-- **后台执行。** 子智能体并发运行(默认上限 10,可配置至 20)。引擎管理线程池——无需轮询循环。
-- **完成通知。** 子智能体完成后,运行时向父对话注入 `` 哨兵。人类可读的摘要(包含子智能体的发现、变更文件和风险)位于哨兵的紧前一行。父模型读取该摘要并整合结果,无需额外工具调用。
-- **按需读取结果。** 完整子对话记录通过 `agent_eval` 获取的 `transcript_handle` 暂存。摘要不够时,父进程通过 `handle_read` 按切片、行范围或 JSONPath 投影读取——保持父上下文精简而不丢失细节。
-
-详见 [docs/SUBAGENTS.md](docs/SUBAGENTS.md)。
-
----
-
-## 快速开始
-
-```bash
-npm install -g codewhale
+cargo install codewhale-cli --locked
+cargo install codewhale-tui --locked
codewhale --version
codewhale --model auto
```
-预构建二进制对和平台压缩包覆盖 **Linux x64**、**Linux ARM64**(v0.8.8 起)、**macOS x64**、**macOS ARM64** 和 **Windows x64**。其他目标平台(musl、riscv64、FreeBSD 等)请见下方的[从源码安装](#从源码安装)或 [docs/INSTALL.md](docs/INSTALL.md)。
-
-首次启动时会提示输入 [DeepSeek API key](https://platform.deepseek.com/api_keys)。密钥保存到 `~/.codewhale/config.toml`(同时兼容旧版 `~/.deepseek/config.toml`),在任意目录、IDE 终端和脚本中都能使用,不会触发系统密钥环弹窗。
-
-也可以提前配置:
+其他路径:
```bash
-codewhale auth set --provider deepseek # 保存到 ~/.codewhale/config.toml
+# GitHub Releases 提供平台归档包:
+# https://github.com/Hmbown/CodeWhale/releases
-codewhale auth status # 显示当前活跃的凭证来源
-export DEEPSEEK_API_KEY="YOUR_KEY" # 环境变量方式;需要在非交互式 shell 中使用请放入 ~/.zshenv
+# 如果 GitHub 访问不稳定,可以使用 CNB 镜像:
+cargo install --git https://cnb.cool/codewhale.net/codewhale --tag v0.8.54 codewhale-cli --locked --force
+cargo install --git https://cnb.cool/codewhale.net/codewhale --tag v0.8.54 codewhale-tui --locked --force
+
+# 旧 Homebrew 兼容路径,formula 仍使用 deepseek-tui 名称
+brew tap Hmbown/deepseek-tui
+brew install deepseek-tui
+```
+
+v0.8.54 的 `codewhale` npm wrapper 暂缓发布,直到 release asset 发布路径加固完成。本版本请使用 Cargo、GitHub Releases 或 CNB。
+
+Docker、直接下载、中国大陆镜像、Windows/Scoop、Nix、校验和和故障排查见 [docs/INSTALL.md](docs/INSTALL.md)。
+
+## 第一次运行
+
+```bash
+codewhale auth set --provider deepseek
+codewhale auth status
+codewhale doctor
codewhale
-
-codewhale doctor # 验证安装
```
-> 轮换或移除密钥:`codewhale auth clear --provider deepseek`。
+常用入口:`/provider`、`/model`、`/config`、`/statusline`、`/skills`、`/restore`。在输入框前加 `!` 可以通过正常审批和沙箱路径运行 Shell 命令。
-### 腾讯云 / CNB 远程优先路径
+## 更多文档
-如果你想要一个长期在线、可从手机控制的工作区,推荐使用腾讯云原生路径:
-CNB 镜像/源码,腾讯云 Lighthouse 香港实例,飞书/Lark 长连接桥接,
-以及可选的 EdgeOne 公网 HTTPS 边缘。运行时 API 必须绑定在 localhost;
-不要通过 EdgeOne 暴露 `/v1/*`。
+README 只保留概念和最快路径。细节放在文档和 [codewhale.net](https://codewhale.net/):
-先看 [docs/TENCENT_CLOUD_REMOTE_FIRST.md](docs/TENCENT_CLOUD_REMOTE_FIRST.md),
-再按 [docs/TENCENT_LIGHTHOUSE_HK.md](docs/TENCENT_LIGHTHOUSE_HK.md) 配置服务器。
+- [用户指南](docs/GUIDE.md)
+- [安装指南](docs/INSTALL.md)
+- [配置和仓库 constitution](docs/CONFIGURATION.md)
+- [Provider 注册表](docs/PROVIDERS.md)
+- [子 Agent](docs/SUBAGENTS.md)
+- [Runtime API](docs/RUNTIME_API.md)
+- [Model Lab](docs/MODEL_LAB.md)
+- [架构](docs/ARCHITECTURE.md)
+- [v0.9.0 发布验收](docs/V0_9_0_RELEASE_ACCEPTANCE.md)
-### Auto 模式
+## v0.9.0 轨道
-使用 `codewhale --model auto` 或 `/model auto` 让 codewhale 自行决定每轮需要多少模型和推理能力。
-
-Auto 模式同时控制两个设置:
-
-- 模型:`deepseek-v4-flash` 或 `deepseek-v4-pro`
-- 推理强度:`off`、`high` 或 `max`
-
-在真实请求发出之前,应用会先用关闭推理的 `deepseek-v4-flash` 进行一次小型路由调用。路由器审视最新请求和最近的上下文,然后为真实请求选定具体的模型和推理强度。简短/简单的轮次保持在 Flash + 关闭推理;编码、调试、发布、架构、安全审查或模糊的多步骤任务可升级到 Pro 和/或更高推理强度。
-
-`auto` 是 codewhale 本地行为。上游 API 永远不会收到 `model: "auto"`,它只会收到为当前轮次选定的具体模型和推理强度设置。TUI 会显示选定的路由,成本跟踪按实际运行的模型计费。如果路由调用失败或返回无效答案,应用会回退到本地启发式规则。子智能体会继承 auto 模式,除非你为它们指定了显式模型。
-
-需要可重复基准测试、严格控制成本上限或特定提供商/模型映射时,请使用固定模型或固定推理强度。
-
-### Linux ARM64(HarmonyOS 轻薄本、openEuler、Kylin、树莓派、Graviton 等)
-
-从 v0.8.8 起,`npm i -g codewhale` 直接支持 glibc 系的 ARM64 Linux。你也可以从 [Releases 页面](https://github.com/Hmbown/CodeWhale/releases) 下载预编译二进制,放到 `PATH` 目录中。
-
-HarmonyOS PC 运行和 OpenHarmony 交叉编译配置见 [docs/HarmonyOS.md](docs/HarmonyOS.md)。
-
-### 中国大陆 / 镜像友好安装
-
-如果在中国大陆访问 GitHub 或 npm 下载较慢,可以通过 Cargo 注册表镜像安装:
-
-```toml
-# ~/.cargo/config.toml
-[source.crates-io]
-replace-with = "tuna"
-
-[source.tuna]
-registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"
-```
-
-然后安装两个二进制(调度器在运行时会调用 TUI):
-
-```bash
-cargo install codewhale-cli --locked # 提供推荐入口 `codewhale`
-cargo install codewhale-tui --locked # 提供交互式 TUI 伴随二进制
-codewhale --version
-```
-
-也可以直接从 [GitHub Releases](https://github.com/Hmbown/CodeWhale/releases) 下载预编译二进制。`DEEPSEEK_TUI_RELEASE_BASE_URL` 可用于镜像后的 release 资产。
-
-### Windows (Scoop)
-
-[Scoop](https://scoop.sh) 是一个 Windows 软件包管理器。codewhale 已进入
-Scoop main bucket,但该 manifest 独立更新,可能滞后于 GitHub/npm/Cargo
-release。先运行 `scoop update`,安装后用 `codewhale --version` 核对版本:
-
-```bash
-scoop update
-scoop install codewhale
-codewhale --version
-```
-
-如果需要最新版本,请优先使用 npm 或直接下载 GitHub Release 资产。
-
-
-
-从源码安装
-
-适用于任何 Tier-1 Rust 目标,包括 musl、riscv64、FreeBSD 以及尚无预编译包的 ARM64 发行版。
-
-```bash
-# Linux 构建依赖(Debian/Ubuntu/RHEL):
-# sudo apt-get install -y build-essential pkg-config libdbus-1-dev
-# sudo dnf install -y gcc make pkgconf-pkg-config dbus-devel
-
-git clone https://github.com/Hmbown/CodeWhale.git
-cd CodeWhale
-
-cargo install --path crates/cli --locked # 需要 Rust 1.88+;提供 `codewhale`
-cargo install --path crates/tui --locked # 提供 `codewhale-tui`
-```
-
-两个二进制都需要安装。交叉编译和平台特定说明见 [docs/INSTALL.md](docs/INSTALL.md)。
-
-
-
-### 其他模型提供方
-
-```bash
-# NVIDIA NIM
-codewhale auth set --provider nvidia-nim --api-key "YOUR_NVIDIA_API_KEY"
-codewhale --provider nvidia-nim
-
-# AtlasCloud
-codewhale auth set --provider atlascloud --api-key "YOUR_ATLASCLOUD_API_KEY"
-codewhale --provider atlascloud
-
-# Wanjie Ark
-codewhale auth set --provider wanjie-ark --api-key "YOUR_WANJIE_API_KEY"
-codewhale --provider wanjie-ark --model deepseek-reasoner
-
-# OpenRouter
-codewhale auth set --provider openrouter --api-key "YOUR_OPENROUTER_API_KEY"
-codewhale --provider openrouter --model deepseek/deepseek-v4-pro
-codewhale --provider openrouter --model arcee-ai/trinity-large-thinking
-codewhale --provider openrouter --model qwen/qwen3.7-max
-
-# Xiaomi MiMo
-codewhale auth set --provider xiaomi-mimo --api-key "YOUR_XIAOMI_MIMO_API_KEY"
-codewhale --provider xiaomi-mimo --model mimo-v2.5-pro
-codewhale --provider xiaomi-mimo speech "???MiMo" --model tts -o hello.wav
-XIAOMI_MIMO_TOKEN_PLAN_API_KEY="tp-..." XIAOMI_MIMO_MODE="token-plan-sgp" \
- codewhale --provider xiaomi-mimo --model mimo-v2.5-pro
-
-# Novita
-codewhale auth set --provider novita --api-key "YOUR_NOVITA_API_KEY"
-codewhale --provider novita --model deepseek/deepseek-v4-pro
-
-# Fireworks
-codewhale auth set --provider fireworks --api-key "YOUR_FIREWORKS_API_KEY"
-codewhale --provider fireworks --model deepseek-v4-pro
-
-# SiliconFlow
-codewhale auth set --provider siliconflow --api-key "YOUR_SILICONFLOW_API_KEY"
-codewhale --provider siliconflow --model deepseek-ai/DeepSeek-V4-Pro
-
-# 通用 OpenAI 兼容端点
-codewhale auth set --provider openai --api-key "YOUR_OPENAI_COMPATIBLE_API_KEY"
-OPENAI_BASE_URL="https://openai-compatible.example/v4" codewhale --provider openai --model glm-5
-
-# 自托管 SGLang
-SGLANG_BASE_URL="http://localhost:30000/v1" codewhale --provider sglang --model deepseek-v4-flash
-
-# 自托管 vLLM
-VLLM_BASE_URL="http://localhost:8000/v1" codewhale --provider vllm --model deepseek-v4-flash
-
-# 自托管 Ollama
-ollama pull codewhale-coder:1.3b
-codewhale --provider ollama --model codewhale-coder:1.3b
-
-# Hugging Face Inference Providers
-codewhale auth set --provider huggingface --api-key "YOUR_HF_TOKEN"
-codewhale --provider huggingface --model deepseek-ai/DeepSeek-V4-Pro
-```
-
-在 TUI 内,`/provider` 打开提供方选择器,`/model` 打开本地模型/思考模式
-选择器。`/provider openrouter` 和 `/model ` 可直接切换;`/models` 会在
-当前提供方支持模型列表时显式请求并列出 API 返回的实时模型。
-
----
-
-## 版本说明
-
-每个版本的具体变更见 [CHANGELOG.md](CHANGELOG.md)。README 只保留当前
-安装方式、核心工作流、模型提供方配置、运行时接口和扩展入口。
-
----
-
-## 使用方式
-
-```bash
-codewhale # 交互式 TUI
-codewhale "explain this function" # 一次性提示
-codewhale exec --auto --output-format stream-json "fix this bug" # 面向后端集成的 NDJSON 流
-codewhale exec --resume "follow up" # 继续非交互会话
-codewhale --model deepseek-v4-flash "summarize" # 指定模型
-codewhale --model auto "fix this bug" # 自动选择模型 + 推理强度
-codewhale --yolo # 自动批准工具
-codewhale auth set --provider deepseek # 保存 API key
-codewhale doctor # 检查配置和连接
-codewhale doctor --json # 机器可读诊断
-codewhale setup --status # 只读安装状态
-codewhale setup --tools --plugins # 创建本地工具和插件目录
-codewhale models # 列出可用 API 模型
-codewhale sessions # 列出已保存会话
-codewhale resume --last # 恢复最近会话
-codewhale resume # 按 UUID 恢复指定会话
-codewhale fork # 将已保存会话分叉为兄弟路径
-codewhale serve --http # HTTP/SSE API 服务
-codewhale serve --mobile # 局域网移动端控制页,默认启用 token 保护
-codewhale serve --acp # Zed/自定义智能体的 ACP stdio 适配器
-codewhale run pr # 获取 PR 并预填审查提示
-codewhale mcp list # 列出已配置 MCP 服务器
-codewhale mcp validate # 校验 MCP 配置和连接
-codewhale mcp-server # 启动 dispatcher MCP stdio 服务器
-codewhale update # 检查并应用二进制更新
-```
-
-Docker 镜像发布在 GHCR 上:
-
-```bash
-docker volume create codewhale-home
-
-docker run --rm -it \
- -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
- -v codewhale-home:/home/codewhale/.codewhale \
- -v "$PWD:/workspace" \
- -w /workspace \
- ghcr.io/hmbown/codewhale:latest
-```
-
-固定 tag、本地构建、volume 权限和非交互管道用法见 [docs/DOCKER.md](docs/DOCKER.md)。
-
-### Zed / ACP
-
-DeepSeek 可作为自定义 Agent Client Protocol 服务器运行,供 Zed 等编辑器通过 stdio 调用本地 ACP 智能体。在 Zed 中添加自定义智能体服务器:
-
-```json
-{
- "agent_servers": {
- "DeepSeek": {
- "type": "custom",
- "command": "codewhale",
- "args": ["serve", "--acp"],
- "env": {}
- }
- }
-}
-```
-
-首个 ACP 切片支持通过现有 DeepSeek 配置/API 密钥创建新会话和提示响应。工具支持的编辑和检查点回放尚未通过 ACP 暴露。
-
-### 常用快捷键
-
-| 按键 | 功能 |
-|---|---|
-| `Tab` | 补全 `/` 或 `@`;运行中则把草稿排队;否则切换模式 |
-| `Shift+Tab` | 切换推理强度:off → high → max |
-| `F1` | 可搜索帮助面板 |
-| `Esc` | 返回 / 关闭 |
-| `Ctrl+K` | 命令面板 |
-| `Ctrl+R` | 恢复旧会话 |
-| `Alt+R` | 搜索提示历史和恢复草稿 |
-| `Ctrl+S` | 暂存当前草稿(`/stash list`、`/stash pop` 恢复) |
-| `@path` | 在输入框中附加文件或目录上下文 |
-| `↑`(在输入框开头) | 选择附件行进行移除 |
-
-完整快捷键目录:[docs/KEYBINDINGS.md](docs/KEYBINDINGS.md)。
-
----
-
-## 模式
-
-| 模式 | 行为 |
-|---|---|
-| **Plan** 🔍 | 只读调查;模型先探索并提出计划(`update_plan` + `checklist_write`),然后再做更改 |
-| **Agent** 🤖 | 默认交互模式;多步工具调用带审批门禁 |
-| **YOLO** ⚡ | 在可信工作区自动批准工具;仍会维护计划和清单以保持可见性 |
-
----
-
-## 配置
-
-用户配置:`~/.codewhale/config.toml`(兼容旧版 `~/.deepseek/config.toml`)。项目覆盖:`/.codewhale/config.toml`(兼容 `/.deepseek/config.toml`)(以下密钥被拒绝:`api_key`、`base_url`、`provider`、`mcp_config_path`)。完整选项见 [config.example.toml](config.example.toml)。
-
-常用环境变量:
-
-| 变量 | 用途 |
-|---|---|
-| `DEEPSEEK_API_KEY` | DeepSeek API key |
-| `DEEPSEEK_BASE_URL` | API base URL |
-| `DEEPSEEK_HTTP_HEADERS` | 可选模型请求头,例如 `X-Model-Provider-Id=your-model-provider` |
-| `DEEPSEEK_MODEL` | 默认模型 |
-| `DEEPSEEK_STREAM_IDLE_TIMEOUT_SECS` | 流式响应空闲超时秒数,默认 `300`,限制在 `1..=3600` |
-| `CODEWHALE_PROVIDER` / `DEEPSEEK_PROVIDER` | `deepseek`(默认)、`nvidia-nim`、`openai`、`atlascloud`、`wanjie-ark`、`volcengine`、`openrouter`、`xiaomi-mimo`、`novita`、`fireworks`、`siliconflow`、`moonshot`、`sglang`、`vllm`、`ollama`、`huggingface` |
-| `DEEPSEEK_PROFILE` | 配置 profile 名称 |
-| `DEEPSEEK_MEMORY` | 设为 `on` 启用用户记忆 |
-| `DEEPSEEK_ALLOW_INSECURE_HTTP=1` | 在可信网络上允许非本机 `http://` API base URL |
-| `NVIDIA_API_KEY` / `OPENAI_API_KEY` / `ATLASCLOUD_API_KEY` / `WANJIE_ARK_API_KEY` / `VOLCENGINE_API_KEY` / `ARK_API_KEY` / `OPENROUTER_API_KEY` / `XIAOMI_MIMO_TOKEN_PLAN_API_KEY` / `MIMO_TOKEN_PLAN_API_KEY` / `XIAOMI_MIMO_API_KEY` / `MIMO_API_KEY` / `NOVITA_API_KEY` / `FIREWORKS_API_KEY` / `SILICONFLOW_API_KEY` / `MOONSHOT_API_KEY` / `KIMI_API_KEY` / `SGLANG_API_KEY` / `VLLM_API_KEY` / `OLLAMA_API_KEY` / `HUGGINGFACE_API_KEY` / `HF_TOKEN` | 提供商认证 |
-| `OPENAI_BASE_URL` / `OPENAI_MODEL` | 通用 OpenAI 兼容端点和模型 ID |
-| `ATLASCLOUD_BASE_URL` / `ATLASCLOUD_MODEL` | AtlasCloud 端点和模型覆盖 |
-| `WANJIE_ARK_BASE_URL` / `WANJIE_ARK_MODEL` | Wanjie Ark 端点和模型覆盖 |
-| `VOLCENGINE_BASE_URL` / `ARK_BASE_URL` / `VOLCENGINE_MODEL` / `ARK_MODEL` | Volcengine Ark 端点和模型覆盖 |
-| `OPENROUTER_BASE_URL` | OpenRouter 端点覆盖 |
-| `XIAOMI_MIMO_BASE_URL` / `MIMO_BASE_URL` / `XIAOMI_MIMO_MODEL` / `MIMO_MODEL` / `XIAOMI_MIMO_MODE` / `MIMO_MODE` | Xiaomi MiMo 端点、模型和 Token Plan 模式覆盖 |
-| `NOVITA_BASE_URL` | Novita 端点覆盖 |
-| `FIREWORKS_BASE_URL` | Fireworks 端点覆盖 |
-| `SILICONFLOW_BASE_URL` / `SILICONFLOW_MODEL` | SiliconFlow 端点和模型覆盖 |
-| `SGLANG_BASE_URL` | 自托管 SGLang 端点 |
-| `SGLANG_MODEL` | 自托管 SGLang 模型 ID |
-| `VLLM_BASE_URL` | 自托管 vLLM 端点 |
-| `VLLM_MODEL` | 自托管 vLLM 模型 ID |
-| `OLLAMA_BASE_URL` | 自托管 Ollama 端点 |
-| `OLLAMA_MODEL` | 自托管 Ollama 模型标签 |
-| `HUGGINGFACE_API_KEY` / `HF_TOKEN` | Hugging Face 认证 |
-| `HUGGINGFACE_BASE_URL` / `HUGGINGFACE_MODEL` | Hugging Face 端点和模型覆盖 |
-| `NO_ANIMATIONS=1` | 启动时强制无障碍模式 |
-| `SSL_CERT_FILE` | 企业代理的自定义 CA 包 |
-
-`locale` 会控制界面语言,并作为模型自然语言的兜底设置;最新用户消息的语言优先级更高。也就是说,即使系统 locale 是英文,用户用中文提问时,V4 的 `reasoning_content` 和最终回复也应该使用中文。可在 `config.toml` 中设置 `locale`、使用 `/config locale zh-Hans`、或依赖 `LC_ALL`/`LANG`。详见 [docs/LOCALIZATION.md](docs/LOCALIZATION.md) 和 [docs/CONFIGURATION.md](docs/CONFIGURATION.md)。
-
-### 切换为中文界面
-
-如果界面是其他语言,可以在 TUI 内一键切换为简体中文:
-
-1. 在 Composer 里输入 `/config`,按 Tab 或 Enter 打开配置面板。
-2. 选择 **Edit locale**,在 `New:` 字段输入 `zh-Hans`,按 Enter 应用。
-
-可选语言:`auto` | `en` | `ja` | `zh-Hans` | `pt-BR`。
-
-也可以在 `~/.codewhale/config.toml` 里直接设置 `locale = "zh-Hans"`,或通过 `LC_ALL` / `LANG` 环境变量自动选择:
-
-```toml
-# ~/.codewhale/config.toml
-[tui]
-locale = "zh-Hans"
-```
-
-或者通过环境变量(中文系统通常已自动生效):
-
-```bash
-LANG=zh_CN.UTF-8 codewhale run
-```
-
----
-
-## 模型和价格
-
-| 模型 | 上下文 | 输入(缓存命中) | 输入(缓存未命中) | 输出 |
-|---|---|---|---|---|
-| `deepseek-v4-pro` | 1M | $0.003625 / 1M | $0.435 / 1M | $0.87 / 1M |
-| `deepseek-v4-flash` | 1M | $0.0028 / 1M | $0.14 / 1M | $0.28 / 1M |
-
-旧别名 `deepseek-chat` / `deepseek-reasoner` 映射到 `deepseek-v4-flash`。NVIDIA NIM 变体使用你的 NVIDIA 账号条款。
-
-> [!Note]
-> 上表的 V4 Pro 单价现已成为官方长期价格:DeepSeek 已宣布在 75% 限时折扣窗口于 **2026 年 5 月 31 日 23:59(北京时间)** 结束后,正式将原始价格调整为约四分之一。TUI 的成本估算已使用这些数值,因此无需任何代码改动。后续价格变动请参阅官方 [DeepSeek 定价页面](https://api-docs.deepseek.com/zh-cn/quick_start/pricing)。
-
----
-
-## 创建和安装技能
-
-codewhale 从工作区目录(`.agents/skills` → `skills` → `.opencode/skills` → `.claude/skills`)和全局 `~/.codewhale/skills`(兼容旧版 `~/.deepseek/skills`)发现技能。每个技能是一个包含 `SKILL.md` 的目录:
-
-```text
-~/.codewhale/skills/my-skill/
-└── SKILL.md
-```
-
-需要 YAML frontmatter:
-
-```markdown
----
-name: my-skill
-description: 当 DeepSeek 需要遵循我的自定义工作流时使用这个技能。
----
-
-# My Skill
-这里写给智能体的指令。
-```
-
-常用命令:`/skills`(列出)、`/skill `(激活)、`/skill new`(创建)、`/skill install github:/`(社区)、`/skill update` / `uninstall` / `trust`。社区技能直接从 GitHub 安装,无需后端服务。已安装技能在模型可见的会话上下文里列出;当任务匹配技能描述时,智能体可通过 `load_skill` 工具自动读取对应的 `SKILL.md`。
-
----
-
-## 文档
-
-| 文档 | 主题 |
-|---|---|
-| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | 代码库内部结构 |
-| [CONFIGURATION.md](docs/CONFIGURATION.md) | 完整配置参考 |
-| [MODES.md](docs/MODES.md) | Plan / Agent / YOLO 模式 |
-| [MCP.md](docs/MCP.md) | Model Context Protocol 集成 |
-| [RUNTIME_API.md](docs/RUNTIME_API.md) | HTTP/SSE API 服务和移动端控制页 |
-| [INSTALL.md](docs/INSTALL.md) | 各平台安装指南 |
-| [DOCKER.md](docs/DOCKER.md) | GHCR 镜像、volume 和 Docker 用法 |
-| [CNB_MIRROR.md](docs/CNB_MIRROR.md) | CNB 镜像和中国大陆友好安装说明 |
-| [TENCENT_CLOUD_REMOTE_FIRST.md](docs/TENCENT_CLOUD_REMOTE_FIRST.md) | 腾讯云/CNB/Lighthouse/飞书远程优先路径 |
-| [TENCENT_LIGHTHOUSE_HK.md](docs/TENCENT_LIGHTHOUSE_HK.md) | 腾讯云 Lighthouse 香港实例配置 |
-| [MEMORY.md](docs/MEMORY.md) | 用户记忆功能指南 |
-| [SUBAGENTS.md](docs/SUBAGENTS.md) | 子智能体角色分类与生命周期 |
-| [KEYBINDINGS.md](docs/KEYBINDINGS.md) | 完整快捷键目录 |
-| [RELEASE_RUNBOOK.md](docs/RELEASE_RUNBOOK.md) | 发布流程 |
-| [LOCALIZATION.md](docs/LOCALIZATION.md) | UI 语言矩阵与切换 |
-| [OPERATIONS_RUNBOOK.md](docs/OPERATIONS_RUNBOOK.md) | 运维和恢复 |
-
-完整更新历史:[CHANGELOG.md](CHANGELOG.md)。
-
----
+v0.9.0 仍是集成轨道,只有在 tag、GitHub Release、npm、Cargo 和发布产物都真实切出并验证后才算发布。当前重点包括 relay/交接、转录降噪、命令和 provider 架构、VS Code/GUI runtime API、HarnessProfile、WhaleFlow,以及贡献者 credit hygiene。
## 致谢
diff --git a/docs/GUIDE.md b/docs/GUIDE.md
index 1eaecfd7..b4dafef0 100644
--- a/docs/GUIDE.md
+++ b/docs/GUIDE.md
@@ -282,7 +282,7 @@ Provider IDs, environment variables, model defaults, and capability notes are
kept in the provider registry document.
Use `/model auto` when you want CodeWhale to choose the model and thinking
-level per turn. Use a fixed model when you need repeatable benchmarking or a
+level per turn. Use a fixed model when you need repeatable comparisons or a
strict cost profile.
Use `/compact` when a session gets long and the model starts carrying too much
@@ -403,8 +403,9 @@ If a repository has its own instructions, treat them as part of the active
work. Read the local guidance before editing, and keep any contribution within
the repository's conventions.
-Next: see the "Publishing Your Own Skill" section in [README.md](../README.md)
-and configuration details in [CONFIGURATION.md](CONFIGURATION.md).
+Next: see [SKILL_INVOCATION_DESIGN.md](SKILL_INVOCATION_DESIGN.md) for skill
+activation behavior and [CONFIGURATION.md](CONFIGURATION.md) for config paths
+and project authority.
## 10. Getting Help
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index cde3ab54..b893bdfa 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -5,8 +5,8 @@ This page covers every supported install path and the most common
common platforms.
If you just want the short version, see the
-[main README](../README.md#quickstart) or
-[简体中文 README](../README.zh-CN.md#快速开始).
+[main README](../README.md#install) or
+[简体中文 README](../README.zh-CN.md#安装).
---
@@ -83,9 +83,15 @@ a download sourced from an impersonating repository or mirror.
---
-## 3. Install via npm (recommended)
+## 3. Install via npm (deferred for v0.8.54)
+
+The `codewhale` npm wrapper for v0.8.54 is intentionally deferred while the
+release asset publication path is being hardened. Use Cargo, GitHub Releases,
+or CNB for v0.8.54. The notes below describe the npm wrapper behavior once a
+matching npm package is published.
```bash
+# Available only after the matching npm package is published.
npm install -g codewhale
codewhale
```
@@ -105,7 +111,7 @@ Useful environment variables:
| `DEEPSEEK_TUI_DISABLE_INSTALL=1` | Skip the `postinstall` download entirely (CI smoke, vendored binaries) |
| `DEEPSEEK_TUI_OPTIONAL_INSTALL=1` | Don't fail `npm install` on download/extract errors — useful in CI matrices |
-> **Slow npm download from mainland China?** If `npm install` itself is slow
+> **Slow npm download from mainland China?** Once npm publication resumes, if `npm install` itself is slow
> (not just the postinstall binary download), use an npm registry mirror:
> ```bash
> npm config set registry https://registry.npmmirror.com
@@ -293,7 +299,7 @@ If a new release is bad on your machine, install the last known-good version
explicitly. Replace `X.Y.Z` with the version you want to restore.
```bash
-# npm wrapper, including the matching GitHub release binaries
+# npm wrapper, only for versions that were published to npm
npm install -g codewhale@X.Y.Z
# Cargo install path; both crates are required
@@ -513,9 +519,9 @@ cargo build --release
Both binaries appear in `target\release\codewhale.exe` and
`target\release\codewhale-tui.exe`.
-> **Prefer `npm install -g` on Windows unless you need to modify source.**
-> The npm package pulls prebuilt binaries and avoids the C toolchain
-> dependency entirely — see [Section 3](#3-install-via-npm-recommended).
+> For v0.8.54, prefer the GitHub Release installer/archive or the Cargo crates.
+> The npm wrapper path is deferred for this release while release asset
+> publication is hardened.
---
@@ -666,9 +672,9 @@ path-agnostic — moving `target-dir` does not help.
1. **Add the project's `target/` directory to your AV exclusions list.**
2. **Close the antivirus software temporarily** during `cargo build`.
-3. **Use `npm install -g codewhale` instead** — the npm package ships
- prebuilt binaries and skips the Cargo build entirely
- ([Section 3](#3-install-via-npm-recommended)).
+3. **Use the GitHub Release installer/archive instead** — the release assets
+ ship prebuilt binaries and skip the Cargo build entirely
+ ([Section 6](#6-manual-download-from-github-releases)).
4. **Use `cargo install codewhale-cli --locked`** from crates.io — this
changes the binary path, which some AV tools treat differently.
diff --git a/web/app/[locale]/contribute/page.tsx b/web/app/[locale]/contribute/page.tsx
index e37ba648..28065ae7 100644
--- a/web/app/[locale]/contribute/page.tsx
+++ b/web/app/[locale]/contribute/page.tsx
@@ -75,7 +75,7 @@ const stepsZh = [
},
];
-const recursivePromptEn = `You are running inside CodeWhale on DeepSeek V4 Pro.
+const smallPatchPromptEn = `You are running inside CodeWhale.
Improve CodeWhale itself by finding exactly one small, reviewable friction point in the harness, docs, tests, or contributor workflow.
@@ -92,7 +92,7 @@ Working rules:
Output: issue summary, files changed, checks run, risks or follow-up, and a suggested PR title.`;
-const recursivePromptZh = `你正在 DeepSeek V4 Pro 驱动的 CodeWhale 中运行。
+const smallPatchPromptZh = `你正在 CodeWhale 中运行。
请改进 CodeWhale 本身:只找一个很小、可审查的摩擦点,范围可以是智能体框架、文档、测试或贡献流程。
@@ -113,7 +113,7 @@ export default async function ContributePage({ params }: { params: Promise<{ loc
const { locale } = await params;
const isZh = locale === "zh";
const steps = isZh ? stepsZh : stepsEn;
- const recursivePrompt = isZh ? recursivePromptZh : recursivePromptEn;
+ const smallPatchPrompt = isZh ? smallPatchPromptZh : smallPatchPromptEn;
return (
<>
@@ -146,20 +146,20 @@ export default async function ContributePage({ params }: { params: Promise<{ loc
-
+
- The 100-to-1 prompt turns DeepSeek V4 Pro's cached attention, tool use, and sub-agents into one small, reviewable patch — not a pile of ideas.
+ A good contribution prompt does not reward motion. It asks for one mergeable fact: one real friction point, one small patch, the smallest relevant checks, and the risk a reviewer needs to know.
- The short version of how it works. For the full architecture walk-through, see
+ The short version of how it works: identity first, nested authority next, then modes, tools, and providers.
+ For the full architecture walk-through, see
docs/ARCHITECTURE.md
in the repo.
+ CodeWhale gives the agent an accountable address before it hands over the tool list. The global Constitution handles truth,
+ user agency, action, and verification. Repositories can add local law through
+ .codewhale/constitution.json. Runtime policy then turns modes, approvals,
+ sandboxing, cost limits, and tool boundaries into code.
+
+
+ {[
+ { name: "Identity", cn: "自我", desc: "The agent is an instance in this terminal, workspace, and session. Responsibility gets an address first." },
+ { name: "Authority", cn: "权威", desc: "Current user request, runtime statutes, repo-local law, live evidence, memory, personality, and old handoffs each have a rank." },
+ { name: "Evidence", cn: "证据", desc: "Tool output, file contents, tests, and diagnostics are fact sources. Without evidence, the task is not done." },
+ ].map((row) => (
+
+
{row.name} {row.cn}
+
{row.desc}
+
+ ))}
+
+
+ Put ordinary project instructions in AGENTS.md. Put CodeWhale-specific conflict
+ resolution and verification policy in .codewhale/constitution.json. See the
+ repo authority docs.
+
+
+
Modes 模式
diff --git a/web/app/[locale]/faq/page.tsx b/web/app/[locale]/faq/page.tsx
index 0e3d9167..6ed64751 100644
--- a/web/app/[locale]/faq/page.tsx
+++ b/web/app/[locale]/faq/page.tsx
@@ -23,7 +23,7 @@ const faqEn: FaqItem[] = [
q: "What is CodeWhale?",
a: (
<>
- CodeWhale is a terminal-native coding agent for open-source and open-weight models. It runs from the codewhale command, streams reasoning blocks, edits local workspaces with approval gates, and can auto-route each turn to the right model and thinking level. DeepSeek V4 is the first-class model path; OpenRouter is ready. Hugging Face, self-hosted, and other open-model surfaces are on the roadmap.
+ CodeWhale is a terminal-native coding agent for open-source and open-weight models. It runs from the codewhale command, streams reasoning blocks, edits local workspaces with approval gates, and can auto-route each turn to the right model and thinking level. DeepSeek V4 is the first-class model path; OpenRouter, Hugging Face, self-hosted runtimes, and other OpenAI-compatible routes are additive.
>
),
sources: ["README.md", "docs/ARCHITECTURE.md"],
@@ -113,8 +113,8 @@ codewhale doctor # full connectivity check`}
Set the corresponding env var (e.g. OPENROUTER_API_KEY) and your provider in ~/.codewhale/config.toml.
@@ -157,7 +157,7 @@ default_text_model = "openrouter/deepseek/deepseek-v4-pro"`}
Yes. Use the vllm, sglang, or ollama providers with your local endpoint.
For OpenAI-compatible endpoints (llama.cpp server, text-generation-webui, Aphrodite, etc.), you can use the openai provider with a custom base_url.
CodeWhale also respects DEEPSEEK_ALLOW_INSECURE_HTTP=true for local HTTP endpoints.
- Full Hugging Face TGI/vLLM integration is on the roadmap.
+ Hugging Face Inference Providers are also available through the huggingface provider. Broader Hub discovery, model cards, datasets, and Jobs belong to Model Lab.
>
),
sources: ["#574", "#1303", "docs/CONFIGURATION.md"],
@@ -282,12 +282,12 @@ registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"`}
sources: ["#907", "#1545"],
},
{
- q: "What is Model Lab? When will Hugging Face integration be available?",
+ q: "What is Model Lab? What Hugging Face pieces are available?",
a: (
<>
- Model Lab is the planned open-model infrastructure layer: Hugging Face Hub API for model discovery, model cards, datasets, safetensors adapters, inference providers, and Jobs.
- It is NOT fully implemented. Track progress in #1977.
- Currently, you can use Hugging Face models through the OpenRouter provider or self-hosted endpoints.
+ The huggingface provider is the shipped OpenAI-compatible route for Hugging Face Inference Providers.
+ Model Lab is the planned open-model infrastructure layer for Hub discovery, model cards, datasets, safetensors adapters, and Jobs.
+ Track broader progress in #1977.
>
),
sources: ["#1977", "docs/MODEL_LAB.md"],
@@ -337,7 +337,7 @@ const faqZh: FaqItem[] = [
q: "CodeWhale 是什么?",
a: (
<>
- CodeWhale 是一个面向开源模型的终端原生编程智能体。通过 codewhale 命令启动,流式输出推理块,在有审批门槛的情况下编辑本地工作区,并可为每个回合自动选择最合适的模型和推理深度。DeepSeek V4 是一级模型路径;OpenRouter 已就绪。Hugging Face、自托管等开放模型接口已在路线图中。
+ CodeWhale 是一个面向开源模型的终端原生编程智能体。通过 codewhale 命令启动,流式输出推理块,在有审批门槛的情况下编辑本地工作区,并可为每个回合自动选择最合适的模型和推理深度。DeepSeek V4 是一级模型路径;OpenRouter、Hugging Face、自托管运行时和其他 OpenAI 兼容路由都是增量选择。
>
),
sources: ["README.md", "docs/ARCHITECTURE.md"],
@@ -426,8 +426,8 @@ codewhale doctor # 完整连接检查`}
{isZh ? (
<>
- npm 包装器仍会从{" "}
- github.com/Hmbown/CodeWhale/releases{" "}
- 下载二进制,国内可能较慢。Cargo + Tuna 完全绕开 GitHub。
+ v0.8.54 的 npm wrapper 暂缓发布。Cargo + Tuna 或 CNB 路径可以绕开 GitHub 下载瓶颈。
DeepSeek API(api.deepseek.com)在国内直连,无需代理。
>
) : (
<>
- The npm wrapper still downloads the binary from{" "}
- github.com/Hmbown/CodeWhale/releases, which can
- be slow over GFW. Cargo + Tuna routes around GitHub entirely. The DeepSeek API
- at api.deepseek.com is reachable from mainland
- China without a proxy.
+ The npm wrapper is deferred for v0.8.54. Cargo + Tuna or the CNB path routes
+ around GitHub download bottlenecks. The DeepSeek API at{" "}
+ api.deepseek.com is reachable from mainland China
+ without a proxy.
>
)}
diff --git a/web/app/[locale]/layout.tsx b/web/app/[locale]/layout.tsx
index 86c5f8c1..d284d8da 100644
--- a/web/app/[locale]/layout.tsx
+++ b/web/app/[locale]/layout.tsx
@@ -13,14 +13,14 @@ export async function generateMetadata({ params }: { params: Promise<{ locale: s
return {
title: isZh ? "CodeWhale · DeepSeek V4 智能体运行框架" : "CodeWhale · DeepSeek V4 Agent Harness",
description: isZh
- ? "DeepSeek V4 的最强智能体运行框架。宪政层级、结构化信任、验证与恢复——让模型持续工作并不断进步的规则、工具和反馈循环。国际开源社区,递归自改进。"
- : "The most agentic harness for DeepSeek V4. Constitutional hierarchy, structured trust, verification, and recovery — rules, tools, and feedback loops that help the model keep working. An international open source community building a recursive, self-improving harness.",
+ ? "面向 DeepSeek V4 和开放模型的本地 Agent 运行框架:自我、冲突法、本地工具、证据与恢复。"
+ : "Local-first agent harness for DeepSeek V4 and open models, with operating identity, conflict law, local tools, evidence, and recovery.",
metadataBase: new URL("https://codewhale.net"),
openGraph: {
title: "CodeWhale",
description: isZh
- ? "DeepSeek V4 的最强智能体运行框架。宪政层级、结构化信任、验证与恢复。"
- : "The most agentic harness for DeepSeek V4. Constitutional hierarchy, structured trust, verification, and recovery.",
+ ? "本地 Agent 运行框架,内置自我、冲突法、本地工具、证据与恢复。"
+ : "Local-first agent harness with operating identity, conflict law, local tools, evidence, and recovery.",
url: "https://codewhale.net",
siteName: "CodeWhale",
type: "website",
diff --git a/web/app/[locale]/page.tsx b/web/app/[locale]/page.tsx
index aa88be87..f2a61f96 100644
--- a/web/app/[locale]/page.tsx
+++ b/web/app/[locale]/page.tsx
@@ -147,28 +147,28 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
{isZh
- ? "DeepSeek V4 的最强智能体运行框架。"
- : "The most agentic harness for DeepSeek V4."}
+ ? "先有自我,再有法律,永远留下证据。"
+ : "Ego first. Law next. Evidence always."}
CodeWhale
{isZh
- ? " 就是那个框架——围绕 DeepSeek V4 Pro 和 Flash 构建,用规则、工具、证据和反馈循环让模型持续工作并不断进步。DeepSeek V4 参与了编写。V4 越强,框架越强——每一轮对话留下更好的提示词和更清晰的交接,下一轮从更高起点出发。这个递归循环正是项目的核心使命:借助国际开源社区,构建一个让 V4 自主管理环境的自改进框架。"
- : " is that harness — built around DeepSeek V4 Pro and Flash, with rules, tools, evidence, and feedback loops that help the model keep working and keep improving. DeepSeek V4 helped write it. As V4 improves, the harness improves with it. Each turn leaves behind better prompts and better handoffs — so the next turn starts stronger. That's the recursive loop at the heart of this project: an international open source community building a harness that lets V4 manage its own environment, turn after turn."}
+ ? " 是 DeepSeek V4 和开放模型的本地运行层。它给 Agent 一个可追责的自我、一套处理冲突的 law,以及把工具、审批、回滚、子 Agent 和交接都留在明面上的证据循环。"
+ : " is a local operating layer for DeepSeek V4 and open-model coding work. It gives an agent an accountable self, a conflict law for the workspace, and an evidence loop where tools, approvals, rollback, sub-agents, and handoffs stay visible."}
{/* MISSION CALLOUT */}
{isZh ? (
<>
- 使命
- 构建一个递归自改进的 DeepSeek V4 运行框架——通过国际开源社区的力量,让 V4 在每一轮对话中学会更好地管理自己的环境。
+ 设计骨架
+ ego 是责任落点:这个用户、这个仓库、这个会话。constitution 是冲突法:当上下文吵起来时,谁赢。
>
) : (
<>
- Mission
- Build a recursive, self-improving harness for DeepSeek V4 — by leveraging the international open source community and V4's own ability to manage its environment, turn after turn.
+ Design thesis
+ Ego is where responsibility attaches: this user, this repo, this session. Constitution is conflict law for a noisy workspace.
>
)}
@@ -245,61 +245,61 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
- {isZh ? "核心思想" : "The ideas that make it what it is"}
+ {isZh ? "判断栈" : "The judgment stack"}
{isZh
- ? "一个模型回答问题,一个智能体完成任务。区别在于框架——围绕模型构建的规则、工具、证据和反馈循环的运行环境。CodeWhale 围绕三条原则运作。"
- : "A model answers a question. An agent finishes a task. The difference is the harness — the operating environment that surrounds the model with rules, tools, evidence, and feedback loops. CodeWhale operates on three principles."}
+ ? "模型会生成文本;Agent 会留下后果。CodeWhale 把后果需要的结构放在模型外面:自我、权威、证据、工具,各在其位。"
+ : "A model generates text; an agent leaves consequences. CodeWhale puts the structure for those consequences around the model: self, authority, evidence, and tools, each in its place."}
- Article VII of the Constitution ranks nine sources from the Articles themselves to prior-session handoffs. The user's current message outranks stale project rules. Live tool output outranks assumptions. Verification outranks confidence. The model never guesses which instruction to follow.
+ The agent is not a model card or leaderboard score. It is an instance in this terminal, this workspace, this session. Give it an address before you ask it to act.
-
02 · self-written harness
-
DeepSeek V4 helped build it
+
02 · nested constitution
+
Conflict has law
- V4 wrote parts of this harness. DeepSeek's prefix caching makes the Constitution nearly free to reference every turn. As V4 improves, the harness improves with it. A more effective V4 makes the harness better — the recursive loop that defines this project.
+ Global Constitution, current user request, runtime statutes, repo-local law, live evidence, memory, personality, and old handoffs each have a rank. When they conflict, the agent has an order to follow.
-
03 · open by design
-
International community, small patches
+
03 · local execution
+
Evidence stays local
- The 100-to-1 contribution model: one prompt, many agent-hours, one small patch, one maintainer review. No CLA. No sponsor lockouts. The maintainer reads everything personally, issues are triaged in the open, releases cut from main.
+ Files, shell, git, web, MCP, sub-agents, rollback, and diagnostics are runtime surfaces. The model does not claim verification as a mood; it has to leave evidence.
>
@@ -318,61 +318,61 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
- {/* 100-TO-1 MODEL */}
+ {/* MAINTAINER LOOP */}
-
{isZh ? "100:1 模型" : "100-to-1 model"}
+
{isZh ? "维护者循环" : "maintainer loop"}
- {isZh ? "递归自我改进的开源智能体框架" : "A recursive harness, modelled at 100-to-1"}
+ {isZh ? "长任务要能被继承" : "Long work has to be inheritable"}
{isZh
- ? "1948 年,Ralph Bown 用 100:1 的晶体管模型,把微小的结构讲清楚。CodeWhale 借用同样的形状:一个清晰提示词,把 DeepSeek V4 Pro 的缓存注意力、工具调用与子智能体凝结为一个可审查的小补丁。"
- : "In 1948, Ralph Bown used a 100-to-1 model of the transistor to make a tiny structure legible. CodeWhale uses the same shape: one clear prompt turns DeepSeek V4 Pro's cached attention, tool use, and sub-agents into one small, reviewable patch."}
+ ? "难点不是让模型一次做更多事,而是让用户意图、权威顺序、证据和贡献者上下文足够清楚,让下一个维护者可以接住。"
+ : "The hard part is not making the model do more at once. It is keeping intent, authority, evidence, and contributor context clear enough for the next maintainer to inherit."}
{isZh
- ? "100:1 不是性能基准,而是贡献形状:一个提示词、许多智能体小时、一个小补丁、一次维护者审查。"
- : "100-to-1 is not a throughput benchmark. It is a contribution shape: one prompt, many agent-hours, one small patch, one maintainer review."}
+ ? "好的 Agent 工作不是一团活动记录,而是一条可以复核的线:请求、调查、补丁、验证、署名。"
+ : "Good agent work is not a pile of activity. It is a reviewable line: request, investigation, patch, verification, credit."}
{isZh
- ? "框架承担了繁重工作:宪政提示、结构化信任、反馈循环和跨会话存活的交接。模型可以专注于任务本身。因为 DeepSeek V4 参与构建了这套框架,每一次改进都让 V4 在其中变得更有效——这让下一次改进变得更容易。"
- : "The harness does the heavy lifting: constitutional prompts, structured trust, feedback loops, and handoffs that survive the session. The model is free to focus on the task. And because DeepSeek V4 helped build this harness, each improvement makes V4 more effective within it — which makes the next improvement easier."}
+ ? "框架承担了繁重工作:宪政提示、结构化信任、反馈循环、回滚和跨会话存活的交接。模型可以把注意力放在任务本身。"
+ : "The harness carries the heavy parts: constitutional prompts, structured trust, feedback loops, rollback, and handoffs that survive the session. The model can keep its attention on the task itself."}