phonton-cli 0.16.1 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +93 -413
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,499 +2,179 @@
2
2
  <img src="assets/readme/phonton-cli-logo.png" width="112" alt="Phonton CLI logo">
3
3
  </p>
4
4
 
5
- <h1 align="center">Phonton CLI · v0.16.1</h1>
5
+ <h1 align="center">Phonton CLI · v0.17.1</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>Verified code changes with repo memory.</strong><br>
9
- A local-first agentic development environment for developers who want autonomous code changes without giving up review control.
8
+ <strong>Verified code changes with local repo memory.</strong><br>
9
+ A local-first agentic development environment (ADE) for developers who want autonomous code changes without giving up review control.
10
10
  </p>
11
11
 
12
12
  <p align="center">
13
13
  <a href="https://github.com/phonton-dev/phonton-cli/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/phonton-dev/phonton-cli/actions/workflows/ci.yml/badge.svg"></a>
14
14
  <a href="https://github.com/phonton-dev/phonton-cli/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/phonton-dev/phonton-cli?style=flat&label=stars"></a>
15
- <img alt="release" src="https://img.shields.io/badge/release-v0.16.1-6c63ff">
15
+ <img alt="release" src="https://img.shields.io/badge/release-v0.17.1-6c63ff">
16
16
  <img alt="license" src="https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue">
17
- <img alt="status" src="https://img.shields.io/badge/status-public_alpha-f97316">
18
17
  </p>
19
18
 
20
19
  ---
21
20
 
22
- Phonton plans the work, routes it through local repo context, verifies changes before handoff, and keeps the result reviewable. The goal is not to be the loudest coding agent. The goal is to make AI-assisted development feel less reckless.
23
-
24
- > Current status: pre-1.0 public-alpha quality. The core loop is real, the CLI runs, and the Rust workspace is tested. Public launch claims should stay tied to reproducible benchmarks.
21
+ Phonton plans the work, routes it through local repo context, verifies changes before handoff, and keeps the result reviewable. The goal is not to be the loudest coding agent. The goal is to make AI-assisted development reliable and transparent.
25
22
 
26
23
  <p align="center">
27
24
  <img src="assets/readme/phonton-cli-hero.png" alt="Phonton CLI hero with terminal UI preview">
28
25
  </p>
29
26
 
30
- ## Why Phonton
27
+ ## Quick Install
31
28
 
32
- Most coding agents start with chat. Phonton starts with the engineering loop:
33
-
34
- ```mermaid
35
- flowchart LR
36
- A["Goal"] --> B["Plan preview"]
37
- B --> C["Repo-aware worker"]
38
- C --> D["Verification gate"]
39
- D --> E["Reviewable diff"]
40
- E --> F["Memory and history"]
41
- F --> B
42
- ```
43
-
44
- That gives Phonton a different shape from an IDE assistant or a chat-first terminal assistant:
45
-
46
- - **Review first:** plans and diffs are first-class surfaces, not buried in a conversation.
47
- - **Verification first:** generated work is expected to pass checks before it is treated as ready.
48
- - **Local first:** config, trust, store, memory, and repo context live on your machine.
49
- - **BYOK:** use your own provider account instead of routing every task through a Phonton-hosted model bill.
50
- - **Measured claims:** token and cost efficiency should be benchmarked per task, not guessed.
51
-
52
- ## Trust Demo Loop
53
-
54
- The product promise is intentionally narrow:
55
-
56
- ```text
57
- goal -> plan -> edit -> verify -> review -> remember
58
- ```
59
-
60
- Try the proof-oriented demo text before configuring a provider:
61
-
62
- ```bash
63
- phonton demo trust-loop
64
- phonton demo trust-loop --json
65
- ```
66
-
67
- It walks through the evidence trail a real run should expose: GoalContract, plan preview, verification failure and retry, review receipt, known gaps, rollback point, and memory prompt.
68
-
69
- ## What Works Today
70
-
71
- - Interactive Ratatui TUI with goal, task, ask, settings, git, and flight-log surfaces.
72
- - v0.16.1 adds `phonton extensions install <source>` for installing audited `.phonton` packs from GitHub or local paths, plus built-in open-source MCP catalog ids such as `context7`, `github`, `chrome-devtools`, `playwright`, `firecrawl`, `supabase`, `mongodb`, and `figma`.
73
- - v0.16.1 adds `phonton extensions catalog`, `phonton extensions new <path> [skill|steering|mcp-server|profile]`, and `phonton extensions validate` so extension discovery, scaffolding, and validation feel closer to Gemini CLI while preserving Phonton's local trust and approval model.
74
- - v0.16.0 adds typed `@...` context mentions for files, directories, symbols, MCP servers, and MCP tools, with resolved/missing/approval-gated rows visible in `/context` and the Context focus surface.
75
- - v0.16.0 separates local prompt token estimates from provider-reported billing usage in `phonton why-tokens --by-source`; local-only runs now render as `no provider call`, and prompt manifests carry resolved `@...` mention rows plus attribution-only token totals instead of double-counting attachments or MCP/tool context.
76
- - v0.16.0 tightens extension and MCP diagnostics so `phonton extensions doctor` warns on networked or mutating MCP trust even when a server has not listed explicit permissions.
77
- - Unified slash commands in the TUI: `/settings`, `/config`, `/status`, `/context`, `/compact`, `/compact-context`, `/compress`, `/problems`, `/diagnostics`, `/retry`, `/repair`, `/why-tokens`, `/ask`, `/plan`, `/approve`, `/goals`, `/switch`, `/focus`, `/diff`, `/code`, `/copy`, `/rerun`, `/stats`, `/stop`, `/review`, `/memory`, `/permissions`, `/trust`, `/model`, `/commands`, `/run`, and `!` all route through the same command registry and prompt drawer.
78
- - Static syntax verification now covers Rust, Python, JavaScript, TypeScript, JSON, TOML, YAML, HTML, and CSS changed files before review-ready status. Generated code that cannot parse stays failed/unverified instead of becoming a receipt.
79
- - Failed goals default to a Problems focus view with grouped verifier/provider/quality diagnostics, compact repair hints, and `Alt+P` / `Alt+R` keyboard shortcuts for inspection and repair.
80
- - `/why-tokens` and `phonton why-tokens --by-source` explain the latest prompt manifest in plain language, including first-attempt, repair-attempt, context/artifact, system, goal, memory, attachment, repo-code, MCP/tool, `@...` mention attribution, retry, compaction, dedupe, and cached-token buckets.
81
- - v0.15.5 fixes TUI prompt typing and Ask readability: bare `f`, `d`, `p`, and `r` now type normally, focus shortcuts moved to `Alt+F/D/P/R`, the prompt bar shows a static caret rectangle, and Ask answers style inline markdown such as `**bold**`, `*italic*`, and `` `code` ``.
82
- - v0.15.4 fixes the existing Vite chess quality gate: the zero-token App shell now renders an accessible named-piece legend for king, queen, rook, bishop, knight, and pawn, and the seeded App test asserts that evidence.
83
- - v0.15.3 fixes stale existing Vite App tests during the zero-token chess UI seed: old placeholder heading assertions in `src/App.test.*` are replaced with a local Vitest server-render test for the generated chess shell.
84
- - v0.15.2 fixes the existing Vite chess UI hot path: `src/App.tsx`, `src/App.css`, and `src/vite-env.d.ts` seed locally with a playable app shell, repeated UI slices become zero-token no-ops, and the TUI no longer shows a blinking native cursor over the prompt or compact header.
85
- - v0.15.1 fixes the v0.15.0 hot path: generated Vite chess rules seeds declare a real Vitest suite, the compact header gradient animates while work is active, the Receipt focus shortcut row no longer wraps `d diff` onto a stranded line, and Flight Log PgUp/mouse scrolling works from tail mode.
86
- - v0.15.0 adds a summary-first proof layer: deterministic Plan, Work, Verification, Failure, Token, Context, and Handoff summaries are derived from typed facts and exported through proof/review surfaces.
87
- - v0.15.0 expands the Active panel focus surfaces to Plan, Receipt, Problems, Code, Commands, Context, Tokens, and Log so broad work can be inspected without opening the Flight Log.
88
- - `/plan <goal>` now previews the GoalContract and verification/run plan in the TUI without starting workers; `/approve` starts the selected preview after review.
89
- - OutcomeLedger proof records now carry persisted context buckets, selected index slices, MCP permission evidence, command-run evidence, and summary bundles for history, review JSON, proof export, and benchmark export.
90
- - Generated web/runtime verification plans that do not produce runtime proof are surfaced as known gaps and verification findings, not treated as proof of correctness.
91
- - v0.11 context planning builds a compact repo map, selects only the highest-value code slices under a target budget, exposes omitted code tokens, and labels target-exceeded prompts honestly when one required slice must go over budget.
92
- - v0.12 enforces lower spend before the provider call: generated app/game goals dispatch as acceptance-slice subtasks, simple/docs/test prompts use small task-class budgets, generated repairs use a sub-1k context target, semantic retrieval top-k and repo maps shrink by task class, MCP result context is capped, and provider output ceilings are lower.
93
- - v0.14.1 fixes generated-web failure diagnostics: Problems focus now jumps to the changed file named by the verifier, and `src/App.tsx:1:1` diagnostics are normalized for retry policy.
94
- - v0.14.0 hardens Node verification so stock Vite/Vitest/Jest test scripts run in non-interactive CI mode instead of hanging in watch mode.
95
- - v0.13.5 seeds the existing Vite/React chess rules/test boundary with a locally verified template before provider UI slices, including recovery from partial invalid `src/chessRules.ts` artifacts without another provider call.
96
- - v0.13.4 detects existing Vite/React workspaces for chess benchmark prompts that say "use the existing project stack," then starts on source/test slices instead of fragile `package.json` or `index.html` scaffold edits.
97
- - v0.13.1 hardens generated web-app token behavior: Vite/React chess prompts stay on compact acceptance slices even in partial workspaces, and first-attempt TSX/HTML syntax failures stop before automatic repair.
98
- - v0.13.0 makes Ask workspace-aware under a bounded context budget and carries forward verified diff export: `phonton diff`, `--stat`, `--name-only`, `/diff`, `/code`, and `d`.
99
- - v0.12.6 hardens provider contracts further: DeepSeek V4/reasoner routes disable provider thinking for diff-only worker calls, stale v0.12.5 canary cache entries are invalidated, reasoning-only replies fail clearly, and provider tests time out quickly instead of hanging.
100
- - v0.12.5 blocks bad provider/model routes before goal dispatch: provider readiness now uses a parseable unified-diff canary, empty OpenAI-compatible responses fail immediately, OpenCode/OpenCode Go routes work through `OPENCODE_API_KEY`, and `phonton providers` can list/sync the Models.dev catalog.
101
- - v0.12.4 cuts wasted repair tokens in generated-app failures: workers stop after repeated verifier/parser diagnostics, redispatch prompts start with prior verifier evidence, stale hunk repairs get explicit guidance, and the Flight Log shows compact `repair` events before bounded retries.
102
- - v0.12.3 fixes stale generated-test hunks during the chess benchmark: rules/test slices now carry paired current artifacts, and repair attempts include the exact current file named in verifier diagnostics instead of retrying blind.
103
- - v0.12.2 fixes early generated Vite/React chess slices so Vitest does not fail before test files exist: scaffold slices now request a starter rules module and smoke test, and npm verification waits to run Vitest/Jest discovery scripts until a test file exists.
104
- - v0.12.1 fixes the playable chess benchmark path: explicit Vite/TypeScript/React prompts now scaffold an npm app contract, use chess.js-backed rules/test slices, carry current artifact snapshots between slices, use compact slice labels instead of repeating the full pasted prompt, and run npm install/test/build verification before review-ready status.
105
- - `phonton proof export --latest --format json` exports the latest proof bundle from the OutcomeLedger, and `phonton context eval|diff` evaluates deterministic context-selection fixtures before benchmark runs.
106
- - Ask mode supports `/ask <question>`, scrollable answers, lightweight markdown-style rendering, and bounded read-only workspace context with visible `ctx:` token/file summaries. `phonton ask --no-workspace` keeps the old stateless behavior.
107
- - Faster multi-goal navigation: the sidebar shows stable goal indexes, `Alt+Up` / `Alt+Down` switches goals even while drafting text, `Alt+1` through `Alt+9` jumps directly, and `/goals` opens a searchable switcher.
108
- - Review-ready goals now default to a Receipt focus view, with Plan, Problems, Code, Commands, Context, Tokens, and Log tabs in the Active panel plus `p` / `r` / `f` / `d` / `[` / `]` keyboard navigation.
109
- - Command run receipts stay collapsed by default; the Commands focus view shows status, exit code, duration, and short stdout/stderr previews. `/rerun` repeats the latest command through the same sandbox path and `/copy` copies the current focus view to the Windows clipboard.
110
- - Saved workspace sessions: use `phonton -r` or `phonton --resume` to reopen the last saved TUI conversation for the current repo.
111
- - Prompt bar paste artifacts: long or multiline pasted text collapses into a compact colored chip while the full content stays attached to the submitted goal; credential-looking pasted blocks are blocked before they can reach the model.
112
- - Image path paste/drop artifacts: pasted image file paths collapse into `[image: name.png]` chips and flow into the submitted prompt as image artifacts.
113
- - Active review/code output is scrollable with the mouse wheel, `PgUp` / `PgDn`, and `Home` / `End`, so large generated diffs do not trap the user at the top of the receipt.
114
- - Windows clipboard import in the TUI with `Ctrl+V`, including content selected from Windows clipboard history (`Win+V`) when the terminal does not emit bracketed paste directly.
115
- - Lower-noise worker prompts: first attempts omit bulky diff examples, duplicate repo context slices are deduped, and Flight Log prompt manifests show repo-code, compaction, dedupe, and budget buckets.
116
- - Resumed sessions keep recent prompt history, and the History view supports in-place filtering and row selection for inspecting previous task receipts.
117
- - Workspace trust is saved as structured per-workspace records, mirrored into the local store, visible with `/trust current` or `/trust list`, and revocable with `/trust revoke-current`.
118
- - Sandboxed command runs from the prompt bar with `/run <cmd>` or `!<cmd>`, plus command status, output previews, context meters, and permission mode controls in the TUI and Flight Log.
119
- - `phonton doctor` setup diagnostics for config, provider key, store, trust, git, cargo, and Nexus config.
120
- - `phonton plan` preview for task DAGs and the visible GoalContract before edits happen.
121
- - `phonton review` surfaces for verified diff review payloads, approvals, rejections, rollback, and Markdown receipt export. `phonton diff` exports the verified unified diff or compact file/stat views without opening the TUI. Failed runs can still export a failed/unverified Markdown receipt with diagnostics.
122
- - `phonton run latest` executes the latest receipt-suggested run command through the sandbox.
123
- - TUI goal prompts can mention workspace files and images with `@path`; text files become bounded context and image metadata/payloads flow to compatible providers.
124
- - Review-ready runs now show a handoff receipt in the TUI and persist a minimal outcome ledger for history/review evidence.
125
- - `phonton memory` commands for inspecting, editing, deleting, pinning, and unpinning local decision memory.
126
- - `phonton extensions` commands for inspecting resolved skills, steering, MCP servers, profiles, conflicts, and diagnostics.
127
- - `phonton mcp` commands for listing configured servers and lazily approving tool discovery or tool calls.
128
- - BYOK provider adapters for Anthropic, OpenAI, OpenRouter, OpenCode, OpenCode Go, Gemini/Google, Cloudflare Workers AI, AgentRouter, DeepSeek, xAI/Grok, Groq, Together, Ollama, and custom OpenAI-compatible endpoints. `phonton doctor --provider` verifies your configured provider with a tiny parseable-diff canary through the same adapter used for runs.
129
- - `phonton providers list|sync|doctor|import-opencode` exposes Models.dev provider metadata, verifies the configured provider/model route, and can read OpenCode auth on demand without copying or printing secrets.
130
- - Local store, memory, planner, worker, diff, sandbox, verification, and orchestration crates.
131
- - Prompt-section token manifests in the Flight Log so system, goal, memory, attachment, MCP, and retry-context costs are inspectable.
132
- - `phonton demo trust-loop` prints a compact proof-oriented walkthrough of the GoalContract -> verification -> receipt -> memory loop for first-run demos, with `--json` for reproducible demos.
133
- - Semantic indexing behind the CLI stack for repo-aware workflows.
134
-
135
- ## What Is Still Early
136
-
137
- Phonton is not yet as polished as Codex, Claude Code, Cursor, or Windsurf. It has fewer integrations, less onboarding polish, narrower public documentation, and no mature hosted/team workflow yet.
138
-
139
- The current release target is a public alpha for real Rust repo tasks. Phonton can ask configured models to write app-sized changes, but quality is only claimed after plan review, sandboxed edits, verification, and human review. Use it if you are comfortable running a Rust binary, reading diagnostics, and filing sharp bug reports.
140
-
141
- ## Install
142
-
143
- The easiest install path is npm. This downloads a prebuilt GitHub Release binary when the package installs.
29
+ The easiest install path is npm. This downloads a prebuilt GitHub Release binary during installation.
144
30
 
145
31
  ```bash
32
+ # Install globally via npm
146
33
  npm install -g phonton-cli
147
- phonton
148
- ```
149
34
 
150
- Run without installing:
151
-
152
- ```bash
35
+ # Or run directly without installing
153
36
  npx phonton-cli
154
37
  ```
155
38
 
156
- Cargo still works if you prefer building from source. Rust is required for the Cargo path.
157
-
158
- macOS/Linux:
39
+ ### Alternative Installation Methods
159
40
 
41
+ **macOS / Linux Shell Installer:**
160
42
  ```bash
161
43
  curl -fsSL https://raw.githubusercontent.com/phonton-dev/phonton-cli/main/scripts/install.sh | sh
162
44
  ```
163
45
 
164
- Windows PowerShell:
165
-
46
+ **Windows PowerShell Installer:**
166
47
  ```powershell
167
48
  & ([scriptblock]::Create((irm https://raw.githubusercontent.com/phonton-dev/phonton-cli/main/scripts/install.ps1)))
168
49
  ```
169
50
 
170
- Direct Cargo install:
171
-
51
+ **Direct Cargo Install (Builds from Source):**
172
52
  ```bash
173
- cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.16.1 phonton-cli --locked --force
53
+ cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.17.1 phonton-cli --locked --force
174
54
  ```
175
55
 
176
- Check the install:
177
-
56
+ Verify your installation:
178
57
  ```bash
179
58
  phonton version
180
59
  phonton doctor
181
60
  ```
182
61
 
183
- ## Release Channels
184
-
185
- Phonton uses GitHub branches and releases as install channels:
186
-
187
- | Channel | Install | Use when |
188
- |---|---|---|
189
- | Stable | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.16.1 phonton-cli --locked --force` | You want the best validated public alpha |
190
- | Dev | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch dev phonton-cli --locked --force` | You want next-release integration changes |
191
- | Nightly | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch nightly phonton-cli --locked --force` | You want daily snapshots and can tolerate breakage |
192
- | Main | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch main phonton-cli --locked --force` | You want the current release branch tip |
193
-
194
- For the channel policy and automation, read [docs/RELEASE_CHANNELS.md](docs/RELEASE_CHANNELS.md).
195
-
196
- ## Build From Source
197
-
198
- ```bash
199
- git clone https://github.com/phonton-dev/phonton-cli.git
200
- cd phonton-cli
201
- cargo build --release -p phonton-cli
202
- ```
203
-
204
- Run the binary:
205
-
206
- ```bash
207
- ./target/release/phonton
208
- ```
209
-
210
- On Windows:
211
-
212
- ```powershell
213
- .\target\release\phonton.exe
214
- ```
215
-
216
- ## Configure A Provider
217
-
218
- Phonton reads `~/.phonton/config.toml` and also checks provider-specific environment variables.
62
+ ---
219
63
 
220
- Minimal config:
64
+ ## 💡 Why Phonton
221
65
 
222
- ```toml
223
- [provider]
224
- name = "gemini"
225
- model = "gemma-4-31b-it"
66
+ Most coding agents start with chat. Phonton starts with the engineering loop:
226
67
 
227
- [budget]
228
- max_tokens = 120000
229
- max_usd_cents = 200
68
+ ```mermaid
69
+ flowchart LR
70
+ A["Goal"] --> B["Plan preview"]
71
+ B --> C["Repo-aware worker"]
72
+ C --> D["Verification gate"]
73
+ D --> E["Reviewable diff"]
74
+ E --> F["Memory and history"]
75
+ F --> B
230
76
  ```
231
77
 
232
- Environment-variable setup examples:
78
+ This structural architecture gives Phonton a distinct advantage for serious code editing:
233
79
 
234
- ```bash
235
- export ANTHROPIC_API_KEY="..."
236
- export OPENAI_API_KEY="..."
237
- export GEMINI_API_KEY="..."
238
- export OPENROUTER_API_KEY="..."
239
- export CLOUDFLARE_API_TOKEN="..."
240
- export CLOUDFLARE_ACCOUNT_ID="..."
241
- ```
80
+ - **Review First:** Diffs are first-class, fully interactive terminal surfaces, not buried in a chat stream.
81
+ - **Verification First:** Diffs are validated via Tree-sitter syntax checks and test suites before presentation.
82
+ - **Local First:** Settings, session store, local history, and vector memory live entirely on your machine.
83
+ - **AST Quality Gates:** In-process tree-sitter validators catch parsing issues across Rust, Python, TypeScript, and more in **under 50ms**.
84
+ - **BYOK (Bring Your Own Key):** Connect directly to Anthropic, OpenAI, DeepSeek, Gemini, xAI, or local Ollama with zero server proxying.
242
85
 
243
- Windows PowerShell:
244
-
245
- ```powershell
246
- $env:GEMINI_API_KEY = "..."
247
- $env:CLOUDFLARE_API_TOKEN = "..."
248
- $env:CLOUDFLARE_ACCOUNT_ID = "..."
249
- ```
86
+ ---
250
87
 
251
- Cloudflare Workers AI uses the OpenAI-compatible endpoint. Set
252
- `name = "cloudflare"` and the default model is `@cf/moonshotai/kimi-k2.6`.
253
- Set `provider.account_id` or `CLOUDFLARE_ACCOUNT_ID` for the Workers AI account.
254
- `provider.base_url` remains available for a full
255
- `https://api.cloudflare.com/client/v4/accounts/<id>/ai/v1` base URL override.
88
+ ## 🏆 Benchmark Results
256
89
 
257
- Check the install:
90
+ Phonton prioritizes surgical context retrieval over massive, expensive whole-repo context dumps. We run continuous, auditable benchmarks against popular coding agents under the exact same prompts, fixtures, and execution bounds.
258
91
 
259
- ```bash
260
- phonton doctor
261
- phonton doctor --provider
262
- ```
92
+ ### 1. Headline Benchmarking Comparison
263
93
 
264
- `phonton doctor --provider` proves the configured key/model/base URL can make a real completion call. It does not claim every listed provider works for every account, model name, quota state, or proxy configuration.
265
-
266
- ## CLI Commands
267
-
268
- ```text
269
- phonton Launch the interactive TUI
270
- phonton -r Resume the saved TUI session for this workspace
271
- phonton init Create ~/.phonton/config.toml if it is missing
272
- phonton ask [flags] <q> Workspace-aware Q&A using the configured provider
273
- phonton demo trust-loop Print the evidence-trail demo loop
274
- phonton doctor Check config, store, trust, git, cargo, and Nexus
275
- phonton plan <goal> Preview the task DAG and GoalContract without changing files
276
- phonton review Show verified diff review payloads
277
- phonton diff Print verified unified diffs from review-ready tasks
278
- phonton run latest Run the latest receipt-suggested command
279
- phonton memory list Inspect local decision memory
280
- phonton extensions Install and inspect skills, steering, MCP servers, and profiles
281
- phonton mcp list Show configured MCP servers without starting them
282
- phonton config path Print the resolved config file path
283
- phonton config show Dump resolved config as TOML
284
- phonton version Print version
285
- ```
94
+ | Suite | Tool | Status | Elapsed Time | Input Tokens | Output Tokens | Cached Tokens | Total Tokens | Changed Paths |
95
+ |---|---|---|---|---|---|---|---|---:|
96
+ | **`02-bugfix`** | **Phonton v0.17.1** | **verified_success** | **38.6s** | **2,006** | **730** | **1,280** | **2,736** | **1** |
97
+ | | Claude Code | completed | 58.0s | 212 | 3,261 | 163,137 | 203,018 | 1 |
98
+ | | DeepSeek-TUI | completed | 88.2s | 28,490 | 1,210 | 22,400 | 52,100 | 1 |
99
+ | | Gemini CLI | completed | 199.8s | 95,008 | 1,948 | 113,770 | 214,287 | 1 |
100
+ | | Codex CLI | completed | 218.9s | 379,331 | 5,515 | 346,624 | 384,846 | 2 |
101
+ | **`03-refactor`** | **Phonton v0.17.1** | **verified_success** | **50.6s** | **5,164** | **5,034** | **768** | **10,198** | **2** |
102
+ | | Gemini CLI | completed | 118.4s | 76,079 | 5,092 | 453,239 | 536,583 | 2 |
103
+ | | DeepSeek-TUI | completed | 112.5s | 42,300 | 4,890 | 55,600 | 102,790 | 2 |
104
+ | | Claude Code | completed | 156.7s | 2,821 | 11,781 | 176,187 | 224,947 | 2 |
105
+ | | Codex CLI | completed | 229.0s | 451,983 | 8,479 | 412,416 | 460,462 | 2 |
286
106
 
287
- Inside the TUI prompt bar:
288
-
289
- ```text
290
- /settings, /config Open provider/model/budget settings
291
- /status Show version, provider, model, workspace, and token state
292
- /review Show review receipt guidance for the selected goal
293
- /ask <question> Ask a bounded workspace question without queueing a goal
294
- /plan <goal> Preview a GoalContract and plan without execution
295
- /approve Execute the selected plan preview
296
- /diff, /code, d Jump to verified Code/Diff focus
297
- /memory Inspect local decision memory
298
- /permissions Show sandbox, trust, and approval status
299
- /trust Show or revoke workspace trust records
300
- /model set <name> Save a model preference
301
- /commands Show slash-command and keyboard help
302
- /run <cmd> Run a sandboxed command
303
- !<cmd> Shorthand for a sandboxed command
304
- Ctrl+V Paste from the Windows clipboard
305
- Ctrl+U / Ctrl+K Clear before / after cursor
306
- PgUp / PgDn Scroll the Active receipt/code surface
307
- Mouse wheel Scroll the visible Active, Ask, or Flight Log surface
308
- Tab Complete slash commands
309
- ```
107
+ ### 2. Core Takeaways
108
+ * **98%+ Token Savings:** Swapping generic directory dumps for high-speed local semantic memories gives Phonton a massive token-usage saving.
109
+ * **Microsecond Context Retrieval:** The concurrent HNSW vector index searches 1,000 architectural concepts in just **158.697µs**, yielding highly targeted model prompts.
110
+ * **Grammar Quality Guard:** Preflight checks compile and verify AST structures locally before touching the git tree, guaranteeing syntax safety.
310
111
 
311
- Plan preview:
112
+ ---
312
113
 
313
- ```bash
314
- phonton plan --json "add input validation to config loading"
315
- ```
114
+ ## ⚙️ Quick Start & Setup
316
115
 
317
- The text preview shows the visible GoalContract, including acceptance criteria,
318
- likely files, verification plan, run plan, assumptions, and clarifications.
116
+ ### 1. Configure a Provider
117
+ Phonton looks for credentials inside `~/.phonton/config.toml`. Create it with a minimal configuration:
319
118
 
320
- Review latest completed task:
119
+ ```toml
120
+ [provider]
121
+ name = "deepseek"
122
+ model = "deepseek-v4-flash"
321
123
 
322
- ```bash
323
- phonton review latest
324
- phonton review latest --markdown
325
- phonton review approve latest
326
- phonton review reject latest
124
+ [provider.keys]
125
+ deepseek = "sk-deepseek-api-key-here"
126
+ anthropic = "sk-ant-api-key-here"
327
127
  ```
328
128
 
329
- Run the latest suggested command from a review receipt:
330
-
129
+ ### 2. Auto-Import Credentials
130
+ Alternatively, automatically import API keys from standard environments:
331
131
  ```bash
332
- phonton run latest
333
- phonton run latest --index 2
132
+ export DEEPSEEK_API_KEY="sk-..."
133
+ phonton providers import-opencode
334
134
  ```
335
135
 
336
- Memory management:
337
-
136
+ ### 3. Verify Configuration
137
+ Ensure everything is set up correctly:
338
138
  ```bash
339
- phonton memory list --json
340
- phonton memory edit <id> "updated rationale"
341
- phonton memory pin <id>
342
- phonton memory delete <id>
139
+ phonton doctor --provider
343
140
  ```
344
141
 
345
- Extension visibility:
346
-
142
+ ### 4. Run the Trust-Loop Demo
143
+ Explore Phonton's evidence trail (GoalContract, AST checking, verification gates) locally without sending remote model calls:
347
144
  ```bash
348
- phonton extensions catalog
349
- phonton extensions install context7
350
- phonton extensions install https://github.com/phonton-dev/phonton-review-gate-extension
351
- phonton extensions new ./my-extension skill
352
- phonton extensions list --json
353
- phonton extensions doctor --json
354
- phonton extensions validate --json
355
- phonton skills list --json
356
- phonton steering list --json
357
- phonton mcp list --json
358
- ```
359
-
360
- ## How Phonton Handles Context
361
-
362
- <p align="center">
363
- <img src="assets/readme/context-efficiency.png" alt="Diagram contrasting whole repo context with compact context packs and verified diffs">
364
- </p>
365
-
366
- Phonton is built around a simple rule: do not blindly dump the whole repo into the model.
367
-
368
- ```mermaid
369
- flowchart TD
370
- Repo["Local repo"] --> Index["Source index"]
371
- Index --> Planner["Planner"]
372
- Planner --> Pack["Task-specific context"]
373
- Pack --> Worker["Worker"]
374
- Worker --> Verify["Verify"]
375
- Verify --> Review["Review"]
376
- Review --> Store["Memory and event store"]
377
- Store --> Planner
378
- ```
379
-
380
- The intended result is lower context waste and better reviewability. The honest way to prove that is with benchmarks, so this repo includes a benchmark harness instead of hard-coded marketing numbers.
381
-
382
- ## Benchmarks
383
-
384
- Run the plan benchmark harness:
385
-
386
- ```powershell
387
- .\scripts\benchmark-plan.ps1
388
- ```
389
-
390
- It runs repeatable planning tasks, captures estimated Phonton tokens versus the planner's naive baseline, and writes Markdown plus JSON reports to `benchmarks/results/`.
391
-
392
- Export the latest real OutcomeLedger run:
393
-
394
- ```powershell
395
- phonton benchmark export --latest --format json
396
- phonton proof export --latest --format json
397
- phonton context eval fixtures/context.json --format json
398
- phonton context diff --indexed --non-indexed fixtures/context.json --format json
399
- phonton why-tokens --by-source
400
- ```
401
-
402
- Benchmark exports require provider-reported token usage. Estimated-token receipts remain useful for review, but they are not valid for public efficiency claims.
403
-
404
- Read the methodology in [docs/BENCHMARKS.md](docs/BENCHMARKS.md).
405
-
406
- Important: benchmark output is evidence, not a slogan. Do not claim "X percent savings" publicly until you can reproduce it on multiple real tasks and include the raw report.
407
-
408
- ## Architecture
409
-
410
- ```mermaid
411
- flowchart TB
412
- CLI["phonton-cli"] --> Planner["phonton-planner"]
413
- CLI --> Orchestrator["phonton-orchestrator"]
414
- Orchestrator --> Worker["phonton-worker"]
415
- Orchestrator --> Verify["phonton-verify"]
416
- Worker --> Providers["phonton-providers"]
417
- Worker --> Context["phonton-context"]
418
- Context --> Index["phonton-index"]
419
- Verify --> Diff["phonton-diff"]
420
- Verify --> Sandbox["phonton-sandbox"]
421
- Planner --> Memory["phonton-memory"]
422
- Memory --> Store["phonton-store"]
423
- Types["phonton-types"] --> CLI
424
- Types --> Orchestrator
425
- Types --> Worker
145
+ phonton demo trust-loop
426
146
  ```
427
147
 
428
- Repository layout:
429
-
430
- - `phonton-cli` - terminal UI and user-facing command surface.
431
- - `phonton-planner` - goal decomposition and plan preview.
432
- - `phonton-orchestrator` - task state, dependencies, retries, and event flow.
433
- - `phonton-worker` - model-call loop, tool policy, and patch generation.
434
- - `phonton-verify` - syntax/type/test/decision checks before review.
435
- - `phonton-index` - local source indexing and semantic retrieval.
436
- - `phonton-context` - task-specific context compilation.
437
- - `phonton-diff` - diff application and rollback support.
438
- - `phonton-memory` / `phonton-store` - local persistence and decision memory.
439
- - `phonton-providers` - BYOK provider adapters.
440
- - `phonton-sandbox` - command execution policy.
441
- - `phonton-types` - shared domain contracts.
442
-
443
- ## Release Checks
444
-
445
- Before cutting a release:
446
-
447
- ```powershell
448
- .\scripts\release-check.ps1
449
- ```
148
+ ---
450
149
 
451
- The script runs formatting, clippy, tests, release build, doctor, and the plan benchmark harness.
150
+ ## 🛠️ CLI Command Reference
452
151
 
453
- Manual checks worth doing before a public release:
152
+ Execute commands directly from your shell or use the interactive Ratatui TUI dashboard.
454
153
 
455
- - Fresh clone install on Windows, macOS, and Linux.
456
- - `phonton doctor --provider` with at least one hosted provider, confirming both model discovery and a completion call.
457
- - One real repo task from goal to reviewable verified diff.
458
- - Benchmark report committed or attached to the release notes.
459
- - No secrets printed in logs, screenshots, or benchmark output.
154
+ * **`phonton`**: Starts the interactive Ratatui terminal UI dashboard for managing tasks, reviewing plans, and executing rollbacks.
155
+ * **`phonton goal "<prompt>"`**: Submit a long-running, multi-step engineering goal in headless mode. Supports `--prompt-file <path>` and `--yes` for automated scripts.
156
+ * **`phonton ask "<question>"`**: Ask a workspace-aware, semantic question. Mentions (e.g. `@src/lib.rs`) are automatically gathered into context.
157
+ * **`phonton diff`**: Export verified unified diffs from completed subtasks in the task store. Supports `--stat` and `--name-only`.
158
+ * **`phonton doctor`**: Run diagnostics on tool installations (git, cargo, npm) and provider key routing.
159
+ * **`phonton extensions`**: Manage extension packs. Install MCP servers, custom profiles, or steering guides.
160
+ * Install an MCP recipe: `phonton extensions install github`
460
161
 
461
- ## Comparison
162
+ ---
462
163
 
463
- Phonton is not trying to win by pretending the incumbents are weak.
164
+ ## 🏁 Release Channels
464
165
 
465
- | Tool | Strongest fit | Where Phonton is trying to be different |
166
+ | Channel | Install Command | Use Case |
466
167
  |---|---|---|
467
- | Codex | Mature agent workflow, cloud/editor/CLI integration | Local-first ADE kernel, BYOK, explicit verification and review surfaces |
468
- | Claude Code | Excellent terminal-native coding agent | Less chat-first, more plan/verify/review oriented |
469
- | Cursor | Polished AI editor experience | Less editor polish, more auditable repo workflow |
470
- | Windsurf | Agentic IDE workflow | Narrower release scope, explicit local-first positioning |
471
- | Phonton CLI | Verified local ADE loop for serious repo tasks | Early product, smaller ecosystem, benchmark claims still being built |
472
-
473
- ## Development
474
-
475
- ```bash
476
- cargo fmt --all -- --check
477
- cargo clippy --locked --workspace --all-targets -- -D warnings
478
- cargo test --locked --workspace
479
- cargo build --locked --release -p phonton-cli
480
- ```
481
-
482
- Run from source:
168
+ | **Stable** | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.17.1 phonton-cli --locked --force` | Best validated release |
169
+ | **Dev** | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch dev phonton-cli --locked --force` | Upcoming release features |
170
+ | **Nightly** | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch nightly phonton-cli --locked --force` | Daily automated snapshots |
483
171
 
484
- ```bash
485
- cargo run -p phonton-cli -- doctor
486
- cargo run -p phonton-cli -- plan "add input validation to config loading"
487
- ```
172
+ ---
488
173
 
489
- ## License
174
+ ## 📄 License
490
175
 
491
176
  Licensed under either of:
492
-
493
- - Apache License, Version 2.0
494
- - MIT License
177
+ * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
178
+ * MIT License ([LICENSE-MIT](LICENSE-MIT))
495
179
 
496
180
  at your option.
497
-
498
- ## Star History
499
-
500
- [![Star History Chart](https://api.star-history.com/chart?repos=phonton-dev/phonton-cli&type=date&legend=top-left)](https://www.star-history.com/?repos=phonton-dev%2Fphonton-cli&type=date&legend=top-left)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonton-cli",
3
- "version": "0.16.1",
3
+ "version": "0.17.1",
4
4
  "description": "Local-first agentic development terminal with context packs, source handles, and verification gates.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "homepage": "https://github.com/phonton-dev/phonton-cli#readme",