Skip to content

Commit 622cc5b

Browse files
KonghaYaoglm-5.2
andcommitted
docs: rewrite README — B+D narrative (Rust perf + ACP platform architecture)
- Centered header with badges (License, Rust, Platform, LLMs, Stars) - Why Peri: 10 emoji feature items with benefit-driven descriptions - Architecture: mermaid diagram showing TUI/IDE/Stdio → ACP → Agent core - Built by AI, Published by Human: Nobody Coding pipeline table - Updated GLM-5.1 → GLM-5.2, fixed ACP link typo - Removed crates table and standalone Features section (merged into Why Peri) Co-Authored-By: glm-5.2 <zai-org@claude-code-best.win>
1 parent f47f832 commit 622cc5b

2 files changed

Lines changed: 130 additions & 31 deletions

File tree

README.md

Lines changed: 86 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,75 @@
1-
# Peri
1+
<div align="center">
22

3-
Peri is a terminal coding agent, built the **Nobody Coding** way — powered by **DeepSeek-V4-Pro** and **GLM-5.1**. Peri is compatible with Claude Code — your `.claude/` config just works. It grew out of [OpenLangGraphServer](https://github.com/konghayao/open-langgraph-server) and [Zen Code](https://github.com/konghayao/zen-code). Built in Rust, runs on my little RISC-V dev board.
3+
# Peri Code
44

5-
> Recent commits are almost entirely DeepSeek and GLM. Claude was just there in the beginning.
5+
**A Rust-built coding agent — fast, lean, Claude Code compatible, any LLM.**
6+
7+
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
8+
[![Rust](https://img.shields.io/badge/Built%20with-Rust%20🦀-orange.svg)](https://www.rust-lang.org/)
9+
[![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-blue.svg)](#install)
10+
[![Models](https://img.shields.io/badge/LLMs-Anthropic%20%7C%20DeepSeek%20%7C%20GLM%20%7C%20Qwen-green.svg)](#why-peri)
11+
[![Stars](https://img.shields.io/github/stars/konghayao/peri?style=social)](https://github.com/konghayao/peri)
12+
13+
</div>
14+
15+
One **13 MB binary**, **~50 MB of RAM**, **98% cache hits**. Bring your own API key — DeepSeek, GLM, Qwen, or Anthropic, switch on the fly. Your existing Claude Code config works today, not eventually: skills, hooks, MCP, plugins, sub-agents. **Zero migration, zero lock-in.**
16+
17+
99% of the codebase was written by AI (DeepSeek & GLM-5.2), shipped by humans who decided *what* to build. The agent files its own bugs, fixes them, and writes the lessons back into the repo. More on that [below](#built-by-ai-published-by-human).
18+
19+
---
620

721
## Why Peri
822

9-
- **Rust, not Node.js or Bun.** Fast startup, ~50MB memory footprint, no runtime overhead. Won't sneak up to 1GB while you're not looking.
10-
- **Context optimized.** System prompt frozen at session start, dynamic content isolated behind a boundary marker, tool definitions stable across rounds.
11-
- 95-99% prompt cache hit rate — minimal token waste.
12-
- No agent memory / auto-dream / extra calls to waste your tokens.
13-
- Only core tools in every request. Other tools lazy-loaded on demand using Tool Search.
14-
- **Any LLM, not just one.** Anthropic, OpenAI-compatible APIs — DeepSeek, GLM, whatever works for you.
15-
- **Drop-in compatible.** Your `.claude/` config just works. Zero migration.
16-
- Agents, skills, hooks, and MCP servers.
17-
- Plugins from the Claude Code ecosystem.
18-
- Sub-agents with the same `.claude/agents/` definitions.
19-
- Auto compact — long sessions stay fast and cheap.
20-
- **Streaming Markdown.** Full Markdown rendering as the agent types — code blocks, tables, diffs, all live.
21-
- **IDE-ready via [ACP](https://github.com/Azure/agent-client-protocol).** Connects to [Zed](https://zed.dev) and other ACP clients out of the box. We're also building a "Cloud Code" platform where any ACP-compatible agent can plug in and go.
22-
- **Unchecked but ready.**
23-
- Built-in LSP.
24-
- Background agents: fork work to sub-agents that run while you keep going.
23+
- 🦀 **Rust, not Node.js**
24+
- 13 MB binary, ~50 MB RAM. Won't sneak up to 1 GB while you're not looking
25+
-**95–99% cache hit rate**
26+
- Frozen system prompt + boundary marker = near-zero wasted tokens
27+
- 🌐 **Any LLM**
28+
- Anthropic, OpenAI, DeepSeek, GLM, Qwen. Swap mid-session, no restart
29+
- 🔌 **Drop-in Claude Code compatible**
30+
- Existing Claude Code config just works. Skills, hooks, MCP, plugins — zero migration
31+
- 🔍 **Tool Search**
32+
- The LLM only sees what it needs. ~14 core tools, rest discovered on demand — lean prompts, fat cache hits
33+
- 📝 **Streaming Markdown**
34+
- Code blocks, tables, diffs — fully rendered as the agent types, not after
35+
- 🤖 **Sub-agents & background agents**
36+
- 7 built-in specialists (coder, explorer, code-reviewer, web-researcher…). Fork work to the background and keep going
37+
- 🗜️ **Auto Compact**
38+
- Hours-long sessions stay fast and cheap, automatically
39+
- 📦 **agm**
40+
- `agm install` any skill or agent. One lockfile, any tool
41+
- 🔧 **Built-in LSP & observability**
42+
- Language-aware intelligence out of the box. Langfuse traces, token usage, cache monitor
43+
44+
---
45+
46+
## Architecture
47+
48+
Peri is not just a TUI. It's a layered platform where the **agent core** is decoupled from the **frontend** via the [Agent Client Protocol](https://agentclientprotocol.com). The same core powers three entry points:
49+
50+
```mermaid
51+
graph TD
52+
TUI["**peri-tui**<br/>Terminal (ratatui)"]
53+
IDE["**Zed / JetBrains**<br/>IDE (ACP client)"]
54+
STDIO["**Stdio**<br/>Headless / CI / Cloud"]
55+
56+
TUI -->|MpscTransport| ACP
57+
IDE -->|ACP Stdio| ACP
58+
STDIO -->|ACP Stdio| ACP
59+
60+
ACP["**peri-acp** — ACP Server<br/>session · executor · prompt · commands"]
61+
62+
ACP --> AGENT["**peri-agent**<br/>ReAct loop · LLM adapter · tools · SQLite storage"]
63+
ACP --> MW["**peri-middlewares**<br/>18 middlewares: FS · HITL · SubAgent · Skills · MCP · Hooks · Compact"]
64+
ACP --> LSP["**peri-lsp**<br/>LSP client"]
65+
66+
AGENT -.->|telemetry| LF["**langfuse-client**"]
67+
MW -.->|renders with| WIDGETS["**peri-widgets**<br/>Markdown · code blocks · tables"]
68+
```
69+
70+
**One core, three frontends.** Terminal users get `peri-tui`. IDE users connect via ACP (Zed today, more to come). Headless / CI / cloud scenarios use the Stdio transport. Change the agent logic once — every frontend benefits.
71+
72+
---
2573

2674
## Install
2775

@@ -37,32 +85,39 @@ irm https://raw.githubusercontent.com/konghayao/peri/main/scripts/install.ps1 |
3785
# start peri
3886
peri
3987

88+
# self-update
4089
peri update
41-
4290
```
4391

44-
## How We Built Peri with Nobody Coding
92+
First launch guides you through model and API key configuration — no config file editing required.
93+
94+
---
4595

46-
**Nobody Coding** means exactly what it sounds like. No human wrote a single line of Peri — not the architecture, not the TUI, not the harness tuning that makes open-source models reliable in a Agent loop. Humans decide *what*. AI figures out *how*. You're not pair programming — you're product managing an engineer that never sleeps. 99% of Peri was built this way.
96+
## Built by AI, Published by Human
4797

48-
A typical pipeline:
98+
Peri's code is 99% AI-generated, primarily by DeepSeek and GLM-5.2. The development workflow is a closed loop the agent drives itself:
4999

50-
| When you... | Pipeline kicks off |
100+
| When you... | The loop kicks off |
51101
|---|---|
52-
| **Find a bug or piece of tech debt** | `issue-create``systematic-debugging``writing-plans``subagent-driven-development``issue-archive` → improve CLAUDE.md |
53-
| **Want to build a new feature** | `grill-me``writing-plans``subagent-driven-development` |
54-
| **Notice the codebase getting messy** | `slop-cleaner``improve-codebase-architecture``writing-plans``subagent-driven-development` |
55-
| **Need someone to grok the architecture** | `teacher` → assign a task → `teacher` |
102+
| **Find a bug or tech debt** | `issue-create``systematic-debugging``writing-plans``subagent-driven-development``issue-archive` → update `CLAUDE.md` |
103+
| **Want a new feature** | `grill-me``writing-plans``subagent-driven-development` |
104+
| **Codebase getting messy** | `slop-cleaner``improve-codebase-architecture``writing-plans``subagent-driven-development` |
105+
106+
Each fix that reveals a non-obvious constraint gets written back into `CLAUDE.md` as a **TRAP** — a hard rule the agent follows on every subsequent iteration. The dozens of TRAPs in the repo weren't authored by humans; they were extracted by the agent at the scene of each bug. That's how quality compounds without human code review.
107+
108+
→ Read the full story: [Nobody Coding](docs/blogs/ai-coding-paradigm/nobody-coding.md)
109+
110+
---
56111

57112
## Acknowledgments
58113

59-
- [Claude Code Best](https://github.com/claude-code-best/claude-code)invaluable community support and feedback
114+
- [Claude Code Best](https://github.com/claude-code-best/claude-code) — community support and feedback
60115
- [Superpowers](https://github.com/obra/superpowers) & [Matt Pocock's Skills](https://github.com/mattpocock/skills) — the skill suites that drive Peri's AI engineering workflow
61-
- [ACP](hhttps://agentclientprotocol.com/) — open protocol for agent-IDE communication
116+
- [ACP](https://agentclientprotocol.com) — open protocol for agent-IDE communication
62117
- [rmcp](https://github.com/anthropics/rmcp) — Rust MCP client library
63118
- [Ratatui](https://ratatui.rs) & [Tokio](https://tokio.rs)
64119
- [Langfuse](https://langfuse.com) — LLM observability
65-
- [Zed](https://zed.dev) — first ACP-compatible IDE, proved the protocol works
120+
- [Zed](https://zed.dev) — first ACP-compatible IDE
66121

67122
## License
68123

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# ACP session/load 后历史消息不显示(Zed)
2+
3+
**状态**:Open
4+
**优先级**:中
5+
**创建日期**:2026-06-14
6+
7+
## 问题描述
8+
9+
通过 Zed 编辑器(settings.json 配置 perihelion 作为 ACP Agent)使用时,在 agent panel 的历史会话列表中点击切换到一个历史会话后,历史聊天消息不显示,界面看起来像空白新会话。用户期望看到之前的完整对话记录。
10+
11+
## 症状详情
12+
13+
| 维度 | 观察 |
14+
|------|------|
15+
| 客户端 | Zed 编辑器(通过 settings.json 配置 perihelion 作为 Agent,ACP stdio 模式) |
16+
| 操作 | 在 Zed agent panel 历史列表中点击一个历史会话进行切换 |
17+
| 期望 | 加载该会话后显示之前的完整聊天记录 |
18+
| 实际 | 历史消息不显示,界面呈现为空白会话 |
19+
| 频率 | 目前只试过一次,不确定是否必现 |
20+
| 后续对话 | 未测试——不确定加载后 agent 是否仍记得之前的上下文 |
21+
22+
## 复现条件
23+
24+
- **复现频率**:未知(仅试过一次)
25+
- **触发步骤**
26+
1. 在 Zed 中通过 ACP stdio 模式连接 perihelion
27+
2. 进行若干轮对话后关闭或切走
28+
3. 在 Zed agent panel 的历史会话列表中点击该历史会话
29+
4. 观察消息区域——历史消息未显示
30+
- **环境**:macOS,Zed(版本未知),perihelion 通过 Zed settings.json 配置为 Agent
31+
32+
## 涉及文件
33+
34+
- `peri-acp/src/dispatch/session_load.rs` —— ACP session/load 请求处理入口,从 ThreadStore 加载会话消息历史
35+
36+
## 状态变更记录
37+
38+
| 日期 ||| 操作人 | 说明 |
39+
|------|-----|-----|--------|------|
40+
| 2026-06-14 || Open | agent | 创建 |
41+
42+
## 修复记录
43+
44+
(由 fix-issue 或 issue-verify skill 追加,创建时留空)

0 commit comments

Comments
 (0)