phonton-cli 0.19.3 → 0.19.7

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.
package/README.md CHANGED
@@ -2,131 +2,185 @@
2
2
  <img src="assets/readme/phonton-cli-logo.png" width="128" alt="Phonton CLI logo">
3
3
  </p>
4
4
 
5
- <h1 align="center">Phonton CLI v0.19.0</h1>
5
+ <h1 align="center">Phonton CLI - v0.19.7</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>Your keys. Your code. The autonomous coding agent that never phones home.</strong><br>
9
- Phonton is a local-first agentic development environment (ADE) built around the loop: <code>goal ➔ plan edit verify ➔ review ➔ remember</code>.
8
+ <strong>A local-first ADE for verified, accountable code changes.</strong><br>
9
+ Phonton turns a goal into a visible plan, diff-only work, layered verification,
10
+ reviewable receipts, and inspectable memory.
10
11
  </p>
11
12
 
12
13
  <p align="center">
13
14
  <a href="https://github.com/phonton-dev/phonton-cli/actions/workflows/ci.yml"><img alt="CI Status" src="https://github.com/phonton-dev/phonton-cli/actions/workflows/ci.yml/badge.svg"></a>
14
15
  <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&color=ff69b4"></a>
15
- <img alt="release" src="https://img.shields.io/badge/release-v0.19.0-6c63ff">
16
+ <img alt="release" src="https://img.shields.io/badge/release-v0.19.7-6c63ff">
16
17
  <img alt="license" src="https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue">
17
18
  </p>
18
19
 
19
20
  ---
20
21
 
21
- ## 💡 What is Phonton?
22
+ ## Quick Start
22
23
 
23
- Every AI coding assistant makes you trade privacy for autonomy. To get an agentic experience, you either hand your code to a SaaS vendor's proxy servers, or settle for inline autocompletion.
24
+ ```powershell
25
+ npm install -g phonton-cli@0.19.7
26
+ phonton doctor
27
+ phonton config edit # add your provider API key
28
+ phonton goal "fix the failing npm test in this repo"
29
+ ```
30
+
31
+ Headless benchmark-style runs:
32
+
33
+ ```powershell
34
+ phonton goal --prompt-file prompt.md --yes --json --permission-mode full-access
35
+ phonton review latest --json
36
+ phonton benchmark export --latest
37
+ ```
38
+
39
+ When a run finishes, open the **Receipt** focus in the TUI (or `phonton review
40
+ latest`) for changed files, verification evidence, run commands, known gaps,
41
+ and rollback points. Use `/why-tokens` to see index, memory, and attachment
42
+ contributions.
43
+
44
+ ---
24
45
 
25
- **Phonton is the first tool to deliver both: fully agentic development and absolute, uncompromising privacy.**
46
+ ## What Is Phonton?
26
47
 
27
- Phonton runs as a local-first, headless-ready terminal tool. Your code never leaves your machine. Your API keys go straight to Anthropic, OpenAI, Gemini, or Ollama. No intermediate proxy, no telemetry hooks, and no subscription required.
48
+ Phonton CLI is a local-first agentic development environment (ADE), not a
49
+ generic chatbot. It is built around the accountable development loop:
50
+
51
+ ```text
52
+ goal -> plan -> edit -> verify -> review -> remember
53
+ ```
54
+
55
+ You bring your own model keys or local model runtime. Phonton runs locally,
56
+ keeps its state in local files and SQLite, and sends selected task context only
57
+ to the provider or local model you configure. There is no Phonton-hosted proxy
58
+ between your workspace and your chosen provider.
28
59
 
29
60
  <p align="center">
30
- <img src="assets/readme/phonton-cli-hero.png" alt="Phonton CLI hero with terminal UI preview" width="800">
61
+ <img src="assets/readme/phonton-cli-hero.png" alt="Phonton CLI terminal UI preview" width="800">
31
62
  </p>
32
63
 
33
64
  ---
34
65
 
35
- ## 🌟 Core Differentiators
66
+ ## Why Phonton?
67
+
68
+ ### Visible Goal Contracts
69
+
70
+ Before broad work starts, Phonton turns the request into a `GoalContract` with
71
+ acceptance criteria, expected artifacts, likely files, verification commands,
72
+ assumptions, and clarification questions.
73
+
74
+ ### Interactive Clarification Questionnaire
75
+
76
+ v0.19.6 integrates a fully Interactive Clarification Questionnaire inside the TUI. When requirements are under-specified (confidence < 70% or unanswered questions), execution suspends, guiding the user step-by-step directly in the terminal, automatically appending answers to the prompt, and initiating a clean planning rerun.
36
77
 
37
- ### 1. Zero-Telemetry BYOK (Bring Your Own Key)
38
- Phonton is proxy-free. Requests go directly to `api.anthropic.com`, `api.openai.com`, `generativelanguage.googleapis.com`, or your local `ollama` daemon. Phonton never intercepts your keys and never touches your code in transit. You can packet-capture the network to verify.
78
+ ### Diff-Only Workers
39
79
 
40
- ### 2. The Strict 4-Layer Verification Gate
41
- Unlike other tools that silently write code and let LLM hallucinations ship, Phonton enforces a strict verification gate. Every diff must pass through **four layers** before it is marked as review-ready:
42
- 1. **Tree-Sitter Syntax check**
43
- 2. **Crate check (`cargo check`)**
44
- 3. **Workspace Check (Lints & Format)**
45
- 4. **Automated Test suite execution**
46
- 5. **Interactive Browser rendering check** (Playwright checks + Screenshots in `v0.19.0`)
80
+ Workers produce code changes as diffs. Phonton does not treat worker prose as
81
+ the primary artifact, and unverified changes are not promoted as review-ready.
47
82
 
48
- On failure, verifier diagnostics are surgically fed back to the worker for recursive repair loops.
83
+ ### Layered Verification
49
84
 
50
- ### 3. Multi-Model Intelligence Routing
51
- Phonton routes subtasks by complexity using tiered model mapping (`Local ➔ Cheap ➔ Standard ➔ Frontier`). It automatically escalates to a more powerful model only on verify failure. You pay pennies for boilerplate and invoke frontier intelligence only when a task demands it.
85
+ Phonton verifies changes with the checks that fit the workspace: patch
86
+ applicability, syntax checks, memory/decision checks, Cargo checks and tests,
87
+ Node test scripts, and browser rendering checks for web projects when
88
+ applicable.
52
89
 
53
- ### 4. Semantic Memory Across Sessions
54
- Phonton maintains a persistent SQLite store of architectural decisions, rejected approaches, and task history. The planner consults this memory on every goal decomposition, ensuring it never re-attempts approaches that failed before and builds upon approved design patterns.
90
+ ### Typed Handoff Packets
91
+
92
+ After verification, Phonton writes a typed `HandoffPacket` with changed files,
93
+ verification evidence, run commands, known gaps, rollback points, token/cost
94
+ summary, and context influence. Review starts from evidence rather than a chat
95
+ summary.
96
+
97
+ ### Local Memory And Code Retrieval
98
+
99
+ Phonton stores task history, decisions, rejected approaches, and conventions in
100
+ local SQLite. Code context is retrieved through local symbol indexing and HNSW
101
+ search by default, with an optional Qdrant backend for code retrieval in larger
102
+ workspaces.
103
+
104
+ ### BYOK Providers And MCP Approval Gates
105
+
106
+ Phonton supports Anthropic, OpenAI, OpenRouter, Gemini, Ollama, AgentRouter,
107
+ Cloudflare, DeepSeek, xAI/Grok, Groq, Together, and custom OpenAI-compatible
108
+ endpoints. MCP servers and extension packs are inspectable local config, and
109
+ networked or mutating tool use goes through approval-aware flows.
55
110
 
56
111
  ---
57
112
 
58
- ## Quick Install
113
+ ## Quick Install
59
114
 
60
- The easiest path to install is via npm. The wrapper automatically downloads the prebuilt binary for your platform.
115
+ Install from npm:
61
116
 
62
117
  ```bash
63
- # Install globally
64
118
  npm install -g phonton-cli
65
-
66
- # Verify your installation
67
119
  phonton version
68
120
  phonton doctor
69
121
  ```
70
122
 
71
- ### Alternative Installers
72
-
73
- * **Shell Script (macOS/Linux)**:
74
- ```bash
75
- curl -fsSL https://raw.githubusercontent.com/phonton-dev/phonton-cli/main/scripts/install.sh | sh
76
- ```
77
- * **PowerShell (Windows)**:
78
- ```powershell
79
- & ([scriptblock]::Create((irm https://raw.githubusercontent.com/phonton-dev/phonton-cli/main/scripts/install.ps1)))
80
- ```
81
- * **Cargo (From Source)**:
82
- ```bash
83
- cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.19.0 phonton-cli --locked --force
84
- ```
123
+ Install this exact release from source:
85
124
 
86
- ---
125
+ ```bash
126
+ cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.19.6 phonton-cli --locked --force
127
+ ```
87
128
 
88
- ## ⚖️ How We Compare
129
+ Alternative installers:
89
130
 
90
- | Feature | Phonton CLI | Claude Code | Cursor | Aider |
91
- |---|---|---|---|---|
92
- | **Privacy Model** | **100% Direct (No Proxy)** | Anthropic Proxy | Cursor Proxy | Direct (No Proxy) |
93
- | **Telemetry** | **Zero** | Opt-out | Opt-out | Optional |
94
- | **Multi-Model Support** | **All (BYOK & Local)** | Anthropic Only | Pre-selected | Many |
95
- | **Subscription Fee** | **$0 (Open Source)** | Usage-based | $20/month | $0 (Open Source) |
96
- | **Execution Loop** | **Full Plan/Edit/Verify** | Interactive Chat | Interactive Chat | Interactive Chat |
97
- | **Verification Gates** | **Mandatory 4-Layer** | Manual/Run Command | Manual | Optional |
98
- | **Memory Spine** | **Semantic SQLite** | None | Simple Context | None |
131
+ ```bash
132
+ curl -fsSL https://raw.githubusercontent.com/phonton-dev/phonton-cli/main/scripts/install.sh | sh
133
+ ```
134
+
135
+ ```powershell
136
+ & ([scriptblock]::Create((irm https://raw.githubusercontent.com/phonton-dev/phonton-cli/main/scripts/install.ps1)))
137
+ ```
99
138
 
100
139
  ---
101
140
 
102
- ## 🔄 The Autonomous ADE Loop
103
-
104
- ```mermaid
105
- flowchart TD
106
- Goal["Goal (User Request)"] --> Plan["1. Goal Decomposition (Planner)"]
107
- Plan --> Graph["2. PlanGraph & Conflict Groups Staged"]
108
- Graph --> Dispatch["3. Concurrent / Serialized Worker Dispatch"]
109
- Dispatch --> Edit["4. Bounded Code Modifications (Diff-Only)"]
110
- Edit --> Verify{"5. Strict Verification Gate"}
111
- Verify -- FAIL: Surgical Repair Prompt --> Edit
112
- Verify -- PASS --> Review["6. Reviewable Handoff (HandoffPacket)"]
113
- Review --> Remember["7. SQLite Memory & Session Snapshot Saved"]
114
- ```
141
+ ## v0.19.6 Highlights
142
+
143
+ - Beautiful, guided Interactive Clarification step questionnaire (`Mode::Clarify`) directly inside the Ratatui TUI.
144
+ - Automatic prompt self-refinement by appending answers to the original goal description.
145
+ - Programmatic plan-rerun queueing with strict state, flight log, and checkpoint cleanup to prevent state leaks.
146
+ - Full verification coverage via new automated TUI unit testing.
147
+
148
+ Recent v0.19.x work also includes typed swarm planning metadata, conflict-group
149
+ scheduling, pluggable local/Qdrant code retrieval, MCP capability previews,
150
+ browser verifier cleanup, TUI version display, and auto-update controls.
115
151
 
116
152
  ---
117
153
 
118
- ## 🚀 New in v0.19.0: Swarm Planning & Pluggable Indices
154
+ ## Commands
155
+
156
+ ```bash
157
+ # Launch the interactive Ratatui TUI
158
+ phonton
159
+
160
+ # Run a goal non-interactively through plan/edit/verify/review
161
+ phonton goal "add input validation to config loading" --yes
162
+
163
+ # Run an exact prompt file, useful for benchmark and CI harnesses
164
+ phonton goal --prompt-file prompt.md --yes --permission-mode full-access --json
119
165
 
120
- * **Conflict-Aware Swarm Scheduling (`PlanGraph`)**: Broad goals are decomposed into collaborative swarms. Overlapping touch scopes are isolated into Conflict Groups and serialized, while independent subtasks run concurrently to optimize execution time.
121
- * **Pluggable Code Indexing**: Upgraded `phonton-index` with a pluggable `CodeRetriever` trait. Supports default high-performance `local-hnsw` search and external `qdrant` HTTP vector storage for larger enterprise repositories.
122
- * **Dynamic MCP Capability Discovery**: Run `phonton mcp capabilities <server-id> [--yes]` to preview server info, exposed tools, and sandbox permission proposals safely before initiating any tool execution.
123
- * **Robust Browser Verification**: Dynamically injected `NODE_PATH` resolution guarantees Playwright DOM and interaction tests run flawlessly on isolated temp directories and production workspaces alike.
166
+ # Preview the task graph and GoalContract without editing files
167
+ phonton plan --json "refactor auth layer"
168
+
169
+ # Audit configuration, providers, store, trust, git, Cargo, and index backend
170
+ phonton doctor --provider
171
+
172
+ # Export evidence from the latest run
173
+ phonton benchmark export --latest --format json
174
+
175
+ # Inspect MCP capability proposals without invoking tools
176
+ phonton mcp capabilities <server-id> --json
177
+ ```
124
178
 
125
179
  ---
126
180
 
127
- ## ⚙️ Configuration
181
+ ## Configuration
128
182
 
129
- Configure your direct providers and indexing backend in `~/.phonton/config.toml`:
183
+ Configure providers and the code index in `~/.phonton/config.toml`:
130
184
 
131
185
  ```toml
132
186
  [provider]
@@ -142,7 +196,7 @@ openai = "sk-proj-openai-key-here"
142
196
  backend = "local-hnsw"
143
197
  ```
144
198
 
145
- To enable the external **Qdrant** backend:
199
+ Optional Qdrant code retrieval:
146
200
 
147
201
  ```toml
148
202
  [index]
@@ -153,52 +207,39 @@ qdrant_collection = "phonton-code"
153
207
 
154
208
  ---
155
209
 
156
- ## 🛠️ Commands Reference
157
-
158
- ```bash
159
- # Launch the interactive Ratatui TUI
160
- phonton
161
-
162
- # Run a goal non-interactively through the full plan/edit/verify pipeline
163
- phonton goal "add input validation to config loading" --yes
210
+ ## Benchmark Honesty
164
211
 
165
- # Preview the subtask graph and Conflict Groups without editing files
166
- phonton plan "refactor auth layer"
212
+ Phonton is designed for context efficiency and accountable verification, but
213
+ public comparisons require reproducible evidence: pinned fixtures, exact
214
+ prompts, tool versions, model/provider names, provider-reported token usage
215
+ where available, raw logs, final diffs, verification logs, quality review, and
216
+ handoff evidence.
167
217
 
168
- # Audit configuration, API keys, database, and vector index connectivity
169
- phonton doctor --provider
170
-
171
- # Export benchmark telemetry from the latest run
172
- phonton benchmark export --latest --format json
173
- ```
218
+ Do not treat local-template runs, estimates, or incomplete artifact sets as
219
+ token-efficiency wins.
174
220
 
175
221
  ---
176
222
 
177
- ## 🗺️ Crate Architecture
223
+ ## Crate Architecture
178
224
 
179
- Phonton is written entirely in Rust for performance, correctness, and low memory overhead:
180
- * `phonton-cli`: Interactive TUI, headless runner, benchmark, and CLI commands.
181
- * `phonton-planner`: Multi-model goal decomposition and `PlanGraph` sidecar staging.
182
- * `phonton-orchestrator`: Swarm scheduler, Conflict Group serialization, and verifier pipeline execution.
183
- * `phonton-worker`: Highly optimized context assembler and diff-only code modifier.
184
- * `phonton-index`: Local HNSW symbol index and Qdrant integration.
185
- * `phonton-verify`: Four-layer static checkers (Tree-Sitter, Cargo, Playwright Browser/Screenshot).
186
- * `phonton-mcp`: Lazy initialization client, permission gates, and capabilities descriptor.
225
+ - `phonton-cli`: TUI, headless goal runner, benchmark export, and CLI commands.
226
+ - `phonton-types`: shared GoalContract, HandoffPacket, PlanGraph, events, and provider types.
227
+ - `phonton-planner`: goal decomposition, contract generation, and plan graph metadata.
228
+ - `phonton-orchestrator`: task scheduling, confidence gate, retries, verification, and handoff assembly.
229
+ - `phonton-worker`: context assembly, provider calls, diff-only output, repair prompts, and MCP flow.
230
+ - `phonton-index`: local HNSW symbol/code retrieval plus optional Qdrant retrieval.
231
+ - `phonton-verify`: patch, syntax, decision, Cargo, Node, and browser verification.
232
+ - `phonton-memory` and `phonton-store`: local memory facade and SQLite persistence.
233
+ - `phonton-sandbox`: command and tool execution guardrails.
234
+ - `phonton-extensions` and `phonton-mcp`: local extension loading and MCP runtime.
187
235
 
188
236
  ---
189
237
 
190
- ## 💖 Star History
191
-
192
- If you support a privacy-first, fully autonomous developer experience, please leave us a star!
193
-
194
- [![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)
195
-
196
- ---
197
-
198
- ## 📄 License
238
+ ## License
199
239
 
200
240
  Licensed under either of:
201
- * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
202
- * MIT License ([LICENSE-MIT](LICENSE-MIT))
241
+
242
+ - Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
243
+ - MIT License ([LICENSE-MIT](LICENSE-MIT))
203
244
 
204
245
  At your option.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "phonton-cli",
3
- "version": "0.19.3",
4
- "description": "Local-first agentic development terminal with context packs, source handles, and verification gates.",
3
+ "version": "0.19.7",
4
+ "description": "Local-first ADE CLI for planned, verified, reviewable code changes.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "homepage": "https://github.com/phonton-dev/phonton-cli#readme",
7
7
  "repository": {
@@ -23,21 +23,27 @@
23
23
  "npm/bin/phonton.js",
24
24
  "npm/install.js",
25
25
  "npm/test-wrapper.js",
26
+ "assets/readme/phonton-cli-logo.png",
27
+ "assets/readme/phonton-cli-hero.png",
26
28
  "README.md",
27
29
  "LICENSE-MIT",
28
30
  "LICENSE-APACHE"
29
31
  ],
30
32
  "keywords": [
31
33
  "ai",
32
- "agent",
33
- "coding-agent",
34
+ "ade",
35
+ "agentic-development",
34
36
  "cli",
35
37
  "terminal",
36
38
  "rust",
37
39
  "developer-tools",
38
40
  "local-first",
39
41
  "code-review",
40
- "verification"
42
+ "verification",
43
+ "handoff",
44
+ "memory",
45
+ "byok",
46
+ "mcp"
41
47
  ],
42
48
  "engines": {
43
49
  "node": ">=18"