Skip to content

Commit 311e5e0

Browse files
committed
docs(chapters): strip empty intensifiers from en/vi chapter prose
Mechanical cleanup of empty AI-tell adverbs and intensifiers across the 10 English and 10 Vietnamese chapter files. Applied only outside frontmatter and code fences (zh chapters untouched: they are the canonical source from dgzhuya.com). Removed patterns (per hardikpandya/stop-slop phrases.md): - empty "really", "very", "just" (before common verbs), "simply", "literally", "actually", "genuinely", "honestly", "truly", "deeply", "fundamentally", "inevitably", "interestingly", "importantly", "crucially", "essentially", "ultimately", "obviously", "clearly", "naturally", "basically" - empty "It is worth noting that", "It'"'"'s important to note that", "It should be noted that", "Needless to say", "As we'"'"'ll see", "In this section, we'"'"'ll", "Let me walk you through" - puffery: "delve into", "in the world of", "in the realm of", "this unlocks" Meaning-preserving deletions only — no claims were changed. Meanings of remaining "just" (e.g. "did we just read") and "more importantly" (introducing the strongest claim) were left intact.
1 parent 97283a5 commit 311e5e0

19 files changed

Lines changed: 294 additions & 294 deletions

‎en/src/ch01-overview.md‎

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ title_vi: "Chương 1: Mở đầu — Tại sao Pi-Agent đáng để bạn dà
77
source_url: https://www.dgzhuya.com/modules/ch01-overview
88
language: en
99
version_pairs:
10-
zh: zh/src/ch01-overview.md
11-
en: en/src/ch01-overview.md
12-
vi: vi/src/ch01-overview.md
10+
zh: zh/src/ch01-overview.md
11+
en: en/src/ch01-overview.md
12+
vi: vi/src/ch01-overview.md
1313
original_chars: 6787
1414
code_lines: 89
1515
reading_minutes: 34
@@ -18,34 +18,34 @@ reviewed_by: null
1818
last_updated: 2026-08-20
1919
status: translated
2020
official_refs:
21-
- https://pi.dev/docs/latest/index
22-
- https://pi.dev/docs/latest/quickstart
23-
- https://pi.dev/docs/latest/usage
24-
- https://pi.dev/docs/latest/providers
25-
- https://pi.dev/docs/latest/settings
26-
- https://pi.dev/docs/latest/extensions
27-
- https://pi.dev/docs/latest/skills
28-
- https://pi.dev/docs/latest/packages
29-
- https://pi.dev/docs/latest/models
30-
- https://pi.dev/docs/latest/security
31-
- https://pi.dev/docs/latest/keybindings
32-
- https://pi.dev/docs/latest/sessions
33-
- https://pi.dev/docs/latest/compaction
21+
- https://pi.dev/docs/latest/index
22+
- https://pi.dev/docs/latest/quickstart
23+
- https://pi.dev/docs/latest/usage
24+
- https://pi.dev/docs/latest/providers
25+
- https://pi.dev/docs/latest/settings
26+
- https://pi.dev/docs/latest/extensions
27+
- https://pi.dev/docs/latest/skills
28+
- https://pi.dev/docs/latest/packages
29+
- https://pi.dev/docs/latest/models
30+
- https://pi.dev/docs/latest/security
31+
- https://pi.dev/docs/latest/keybindings
32+
- https://pi.dev/docs/latest/sessions
33+
- https://pi.dev/docs/latest/compaction
3434
terms_used:
35-
- Pi Agent
36-
- Agent Loop
37-
- Tool System
38-
- Session Tree
39-
- TUI
40-
- Skills
41-
- Extensions
42-
- Pi Package
43-
- Prompt Template
44-
- Theme
45-
- Provider
46-
- MCP
47-
- SDK
48-
- YOLO mode
35+
- Pi Agent
36+
- Agent Loop
37+
- Tool System
38+
- Session Tree
39+
- TUI
40+
- Skills
41+
- Extensions
42+
- Pi Package
43+
- Prompt Template
44+
- Theme
45+
- Provider
46+
- MCP
47+
- SDK
48+
- YOLO mode
4949
mermaid_blocks: 1
5050
code_blocks: 8
5151
---
@@ -61,8 +61,8 @@ code_blocks: 8
6161

6262
You probably opened this series for one of three reasons:
6363

64-
1. **"I want a coding agent that actually works"** — you are tired of bloated tools and want something minimal, transparent, fast.
65-
2. **"I want to understand how an agent is actually built"** — you have poked at the source of other agent frameworks, and they were either too complex (tens of thousands of lines) or too naive (a single `while` loop calling itself an agent).
64+
1. **"I want a coding agent that works"** — you are tired of bloated tools and want something minimal, transparent, fast.
65+
2. **"I want to understand how an agent is built"** — you have poked at the source of other agent frameworks, and they were either too complex (tens of thousands of lines) or too naive (a single `while` loop calling itself an agent).
6666
3. **"I want to build my own agent"** — you have a vertical use case and need to build on top of an SDK rather than start from scratch.
6767

6868
These three questions line up exactly with Pi's three identities. The fact that they all point to a single project is itself worth being curious about.
@@ -92,7 +92,7 @@ Breaking it apart:
9292
| Built-in tools | 4 core + 3 helpers | Core: `read` / `write` / `edit` / `bash`; helpers: `grep` / `find` / `ls`. |
9393
| System prompt | Static template ~90 words (200–400 words at runtime) | Compare with Claude Code's tens of thousands of words. |
9494
| TUI codebase | ~12,000 lines | The core `tui.ts` file alone is about 1,700 lines; Mario's game-engine background shows in the restraint. |
95-
| Supported providers | 30+ | The source `KnownProvider` enum actually lists 35 (including regional variants); about 27 unique brands: Anthropic, OpenAI, Google, Groq, Ollama, etc. |
95+
| Supported providers | 30+ | The source `KnownProvider` enum lists 35 (including regional variants); about 27 unique brands: Anthropic, OpenAI, Google, Groq, Ollama, etc. |
9696
| Core packages | 4 | `pi-ai` / `pi-agent-core` / `pi-tui` / `pi-coding-agent`. |
9797
| Run modes | 4 | Interactive / print-JSON / RPC / SDK. |
9898

@@ -145,13 +145,13 @@ Pi-Agent four-layer architecture
145145
146146
---
147147

148-
## 3. View 1: as a coding agent — a daily tool that is actually good
148+
## 3. View 1: as a coding agent — a daily tool that is good
149149

150150
### 3.1 What Pi is: building blocks, not a finished car
151151

152152
State Pi's position in one sentence: **Pi is not another Cursor or Claude Code — it is a box of building blocks for assembling your own coding agent, your way.**
153153

154-
A useful analogy. Cursor is a finished car — seats, air conditioning, navigation all installed, you sit down and drive. Claude Code is also a finished car, just with a race-engine and reinforced suspension. Pi is different — it gives you the engine, chassis, steering column, and wiring harness, plus a guarantee that "we have already verified this combination works." It ships with a default configuration that runs out of the box (just type `pi` and you are up), but its core value is this: you can take the parts apart, reassemble them, add new ones, or restyle them, and build a **car that fits your workflow exactly**.
154+
A useful analogy. Cursor is a finished car — seats, air conditioning, navigation all installed, you sit down and drive. Claude Code is also a finished car, just with a race-engine and reinforced suspension. Pi is different — it gives you the engine, chassis, steering column, and wiring harness, plus a guarantee that "we have already verified this combination works." It ships with a default configuration that runs out of the box (type `pi` and you are up), but its core value is this: you can take the parts apart, reassemble them, add new ones, or restyle them, and build a **car that fits your workflow exactly**.
155155

156156
This positioning is the source of every design decision in Pi. Once you understand it, the following all make sense:
157157

@@ -231,7 +231,7 @@ Here are a few dividends you get out of the box:
231231

232232
**Tree-shaped sessions: when you go down the wrong path, fork.** Pi stores sessions as a **tree structure** (a DAG, a directed acyclic graph), not a linear log. `/tree` jumps to any historical message and forks a new branch from there. All branches live in the same file. Especially useful for debugging — you can try three different fixes from the same starting point without worrying about "not being able to go back".
233233

234-
**YOLO mode and the safety philosophy.** Pi defaults to YOLO — the agent executes actions without approval prompts. Mario's argument: approval-based safety measures cause user fatigue ("prompt fatigue"), and end up either disabled wholesale or reduced to mechanical "yes-clicking" that becomes "security theater". He recommends containerization as the security boundary. If you really need approval flows, about 50 lines of Extension code can build them — the framework exposes every hook you need.
234+
**YOLO mode and the safety philosophy.** Pi defaults to YOLO — the agent executes actions without approval prompts. Mario's argument: approval-based safety measures cause user fatigue ("prompt fatigue"), and end up either disabled wholesale or reduced to mechanical "yes-clicking" that becomes "security theater". He recommends containerization as the security boundary. If you need approval flows, about 50 lines of Extension code can build them — the framework exposes every hook you need.
235235

236236
### 3.4 Up and running in one minute
237237

@@ -286,7 +286,7 @@ Breaking down the key fields:
286286
- **`providers`** — top level is a provider map; the keys (`zhipu` / `deepseek`) are names you pick and become the model's `provider` field in the UI.
287287
- **`api`** — pick the protocol. Most common is `openai-completions` (OpenAI-compatible; nearly every Chinese provider supports it), then `anthropic-messages`, then `openai-responses`. This field decides which request format Pi uses.
288288
- **`baseUrl`** — the provider endpoint.
289-
- **`apiKey`** — stored in plaintext. **Make sure `.pi/` is in your `.gitignore`**, otherwise one careless `git add .` leaks it.
289+
- **`apiKey`** — stored in plaintext. **Make sure `.pi/` is in your `.gitignore`**, otherwise one careless `git add. ` leaks it.
290290
- **`models`** — the list of models under this provider. `id` is the actual model name passed to the API; `name` is the friendly label shown in the TUI.
291291
- **`contextWindow` / `maxTokens`** — optional; tells Pi the window and max output length of this model, which informs the context-compaction strategy.
292292

@@ -335,7 +335,7 @@ Each chapter answers three layers of questions: **what** (the concept), **how**
335335

336336
### 4.3 Pi's "philosophy of subtraction": the real lesson is in the trade-offs
337337

338-
Looking at a framework that "does everything", you can only learn "what they built". Looking at a framework that deliberately does nothing, you learn "what is actually necessary to build an agent".
338+
Looking at a framework that "does everything", you can only learn "what they built". Looking at a framework that deliberately does nothing, you learn "what is necessary to build an agent".
339339

340340
The "What we did not build" section of Pi's official site is a manifesto written upside down. Competitors list features; Pi lists what it gave up. Every sacrifice is backed by a clear engineering reason:
341341

@@ -358,7 +358,7 @@ The third identity: Pi is a set of independently reusable SDKs that let you buil
358358

359359
### 5.1 SDK stack: three-layer architecture plus one orthogonal UI library
360360

361-
Look again at the four-layer architecture diagram from section 2 — note that `pi-tui` is drawn **side by side** with `pi-agent-core`. It is not in the stack chain; it is a "side dependency" used by `pi-coding-agent` only in interactive mode. So from an SDK-reuse perspective, Pi is actually a **three-layer stack** (`pi-ai` → `pi-agent-core` → `pi-coding-agent`), plus an **orthogonal terminal UI library** (`pi-tui`). Each layer of the stack is independently usable, and the UI library is independently usable too — but it solves a different class of problem unrelated to the agent.
361+
Look again at the four-layer architecture diagram from section 2 — note that `pi-tui` is drawn **side by side** with `pi-agent-core`. It is not in the stack chain; it is a "side dependency" used by `pi-coding-agent` only in interactive mode. So from an SDK-reuse perspective, Pi is a **three-layer stack** (`pi-ai` → `pi-agent-core` → `pi-coding-agent`), plus an **orthogonal terminal UI library** (`pi-tui`). Each layer of the stack is independently usable, and the UI library is independently usable too — but it solves a different class of problem unrelated to the agent.
362362

363363
**Layer 1: `pi-ai` — model calls only**
364364

@@ -432,7 +432,7 @@ await session.prompt("Read the codebase and explain the architecture.");
432432

433433
`pi-tui` is Mario's old trade (the libGDX game-engine author), about 12,000 lines implementing:
434434

435-
- **Differential rendering** — only the changed cells are redrawn each frame, basically flicker-free.
435+
- **Differential rendering** — only the changed cells are redrawn each frame, flicker-free.
436436
- **Retained-mode UI** — a declarative component system similar to React, not the imperative style of ncurses.
437437
- **Built-in components** — input boxes with autocomplete, a Markdown renderer, syntax highlighting, fuzzy search.
438438

@@ -477,7 +477,7 @@ Pi is a "trinity" project:
477477

478478
1. **As a tool**: a minimal, transparent, steerable terminal coding agent. Clean context, model freedom, tree-shaped sessions, YOLO by default — for developers who want full control of their tools.
479479
2. **As a textbook**: a high-quality, finishable Agent design reference. 10 chapters cover the core decision points of agent architecture (from Agent Loop to session management), and every line of code comes with a "why this way" answer.
480-
3. **As an SDK**: a clearly layered, independently reusable development kit. The three-layer stack (`pi-ai` → `pi-agent-core` → `pi-coding-agent`) is usable layer by layer, plus a `pi-tui` terminal UI library decoupled from agents; four run modes cover everything from local to production.
480+
3. **As an SDK**: a layered, independently reusable development kit. The three-layer stack (`pi-ai` → `pi-agent-core` → `pi-coding-agent`) is usable layer by layer, plus a `pi-tui` terminal UI library decoupled from agents; four run modes cover everything from local to production.
481481

482482
But the most important thing Pi proves is that **subtraction is a competitive product stance**. In a market racing toward "all-inclusive", the sentence "what I do not need will not be built" is itself a real feature.
483483

@@ -499,7 +499,7 @@ Extensions can implement:
499499
- **Themes** — customize the TUI look.
500500
- **Prompt templates** — reusable prompt fragments.
501501

502-
These five customization levers (Extensions, Skills, Prompt Templates, Themes, Pi Packages) essentially provide **a smooth upgrade path from "using Pi" to "modifying Pi"**.
502+
These five customization levers (Extensions, Skills, Prompt Templates, Themes, Pi Packages) provide **a smooth upgrade path from "using Pi" to "modifying Pi"**.
503503

504504

505505

‎en/src/ch02-three-layer-arch.md‎

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ title_vi: "Chương 2: Kiến trúc ba lớp — Bộ xương của Pi-Agent"
77
source_url: https://www.dgzhuya.com/modules/ch02-three-layer-arch
88
language: en
99
version_pairs:
10-
zh: zh/src/ch02-three-layer-arch.md
11-
en: en/src/ch02-three-layer-arch.md
12-
vi: vi/src/ch02-three-layer-arch.md
10+
zh: zh/src/ch02-three-layer-arch.md
11+
en: en/src/ch02-three-layer-arch.md
12+
vi: vi/src/ch02-three-layer-arch.md
1313
original_chars: 4215
1414
code_lines: 203
1515
reading_minutes: 22
@@ -18,46 +18,46 @@ reviewed_by: null
1818
last_updated: 2026-08-20
1919
status: translated
2020
official_refs:
21-
- https://pi.dev/docs/latest/index
22-
- https://pi.dev/docs/latest/quickstart
23-
- https://pi.dev/docs/latest/usage
24-
- https://pi.dev/docs/latest/providers
25-
- https://pi.dev/docs/latest/settings
26-
- https://pi.dev/docs/latest/extensions
27-
- https://pi.dev/docs/latest/skills
28-
- https://pi.dev/docs/latest/packages
29-
- https://pi.dev/docs/latest/models
30-
- https://pi.dev/docs/latest/security
31-
- https://pi.dev/docs/latest/keybindings
32-
- https://pi.dev/docs/latest/sessions
33-
- https://pi.dev/docs/latest/compaction
21+
- https://pi.dev/docs/latest/index
22+
- https://pi.dev/docs/latest/quickstart
23+
- https://pi.dev/docs/latest/usage
24+
- https://pi.dev/docs/latest/providers
25+
- https://pi.dev/docs/latest/settings
26+
- https://pi.dev/docs/latest/extensions
27+
- https://pi.dev/docs/latest/skills
28+
- https://pi.dev/docs/latest/packages
29+
- https://pi.dev/docs/latest/models
30+
- https://pi.dev/docs/latest/security
31+
- https://pi.dev/docs/latest/keybindings
32+
- https://pi.dev/docs/latest/sessions
33+
- https://pi.dev/docs/latest/compaction
3434
terms_used:
35-
- Pi Agent
36-
- Agent Loop
37-
- Tool System
38-
- Tool
39-
- TUI
40-
- MCP
41-
- Provider
42-
- KnownProvider
43-
- Skills
44-
- Extensions
45-
- Pi Package
46-
- Theme
47-
- SDK
48-
- DAG
49-
- Hot Reload
50-
- pi-ai
51-
- pi-agent-core
52-
- pi-coding-agent
53-
- pi-tui
54-
- pi-orchestrator
55-
- monorepo
56-
- npm workspaces
57-
- TypeScript
58-
- TypeBox
59-
- Static
60-
- TSchema
35+
- Pi Agent
36+
- Agent Loop
37+
- Tool System
38+
- Tool
39+
- TUI
40+
- MCP
41+
- Provider
42+
- KnownProvider
43+
- Skills
44+
- Extensions
45+
- Pi Package
46+
- Theme
47+
- SDK
48+
- DAG
49+
- Hot Reload
50+
- pi-ai
51+
- pi-agent-core
52+
- pi-coding-agent
53+
- pi-tui
54+
- pi-orchestrator
55+
- monorepo
56+
- npm workspaces
57+
- TypeScript
58+
- TypeBox
59+
- Static
60+
- TSchema
6161
code_blocks: 16
6262
mermaid_blocks: 0
6363
---
@@ -93,7 +93,7 @@ If you have worked on Node.js projects before, you have probably used a monorepo
9393

9494
But that is not the point. The point is: **why five packages (four extending the core three-piece set, plus one outer orchestration layer)? What is the relationship between them? Can they be merged?**
9595

96-
To answer that, we need to figure out what each package actually does.
96+
To answer that, we need to figure out what each package does.
9797

9898
---
9999

@@ -250,7 +250,7 @@ After reading the section above, you probably have a picture in your head alread
250250
└──────────┘
251251
```
252252

253-
A very intuitive layering: the bottom calls models, the middle runs the loop, the top handles the business. Right?
253+
A intuitive layering: the bottom calls models, the middle runs the loop, the top handles the business. Right?
254254

255255
But wait —
256256

@@ -272,7 +272,7 @@ If your mental model says "upper layers may only depend on the adjacent lower la
272272
}
273273
```
274274

275-
pi-coding-agent depends on **both** the middle layer (pi-agent-core) **and** the bottom layer (pi-ai). That looks like a violation of "strict layering", but it is actually a deliberate design choice.
275+
pi-coding-agent depends on **both** the middle layer (pi-agent-core) **and** the bottom layer (pi-ai). That looks like a violation of "strict layering", but it is a deliberate design choice.
276276

277277
### The answer is hiding in the type system
278278

@@ -398,7 +398,7 @@ interface AgentTool<TParameters extends TSchema = TSchema, TDetails = any> exten
398398
}
399399
```
400400

401-
`AgentTool` is a "molecule" — it still has the `name`, `description`, and `parameters`, but it adds the ability to actually **run**. The Agent loop iterates over `AgentTool[]`, calls each tool''s `execute`, and feeds the result back into the model.
401+
`AgentTool` is a "molecule" — it still has the `name`, `description`, and `parameters`, but it adds the ability to **run**. The Agent loop iterates over `AgentTool[]`, calls each tool''s `execute`, and feeds the result back into the model.
402402

403403
### Layer 3: pi-coding-agent builds molecules into materials
404404

@@ -475,11 +475,11 @@ interface ToolDefinition {
475475

476476
---
477477

478-
## 6. Do I really need three layers when writing my own Agent?
478+
## 6. Do I need three layers when writing my own Agent?
479479

480480
You might wonder: this Pi layering looks great, but is it overdesigned for my own Agent project?
481481

482-
Let us actually walk through three scenarios to see.
482+
Let us walk through three scenarios to see.
483483

484484
### Scenario A: no layering, everything in one file
485485

@@ -598,7 +598,7 @@ In this chapter we took an outside look at Pi''s overall architecture. You now k
598598
- Types expand progressively from bottom to top: `Tool` → `AgentTool` → `ToolDefinition`
599599
- Three layers are not required; the number of layers depends on your complexity. But dependency-direction control is required.
600600

601-
But we have not yet answered a more fundamental question: how does the Agent actually run? How does the LLM keep thinking, calling tools, reading results, thinking again? What does the famous "Agent Loop" actually look like?
601+
But we have not yet answered a more fundamental question: how does the Agent run? How does the LLM keep thinking, calling tools, reading results, thinking again? What does the famous "Agent Loop" look like?
602602

603603
In the next chapter we drill into the Agent''s heart — **the Agent Loop**. We will first understand why a loop is needed (instead of finishing in one call), then trace a single user message''s full journey from pressing Enter until the Agent says "I am done".
604604

0 commit comments

Comments
 (0)