@zhushanwen/pi-plan 0.4.4 → 0.4.5
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 +37 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @zhushanwen/pi-plan
|
|
2
|
+
|
|
3
|
+
轻量级规划模式 pi extension:`/plan [描述]` 触发,产出结构化 plan 文件。与 coding-workflow 的区别:无 gate / review / retrospect,只负责「想清楚再动手」的计划产出(ADR pi-ext-021 prompt-only readonly / pi-ext-022 session-manager state)。
|
|
4
|
+
|
|
5
|
+
> 本 README 的核心概念词条(Plan Mode / Plan File / Brainstorming)迁自 `docs/extensions/glossary.md`「Extension 专属概念」(2026-09-13)。
|
|
6
|
+
|
|
7
|
+
## 用法
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
/plan 修复项目中所有失败的测试 # 进入 plan mode(brainstorming 阶段开始)
|
|
11
|
+
/plan status # 查看当前阶段与 plan 文件路径
|
|
12
|
+
/plan abort # 取消活跃的 plan mode
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 阶段状态机
|
|
16
|
+
|
|
17
|
+
`idle → brainstorming → writing → complete`(`state.ts` PlanPhase):
|
|
18
|
+
|
|
19
|
+
- **brainstorming**:需求探索。固定四步——1. Quick Overview(ls 项目根 / 读 README / package.json,30 秒内建立上下文)→ 2. 渐进式提问澄清需求 → 3. 方案探索 → 4. 假设审计。
|
|
20
|
+
- **writing**:选定模板后撰写 plan 文件。
|
|
21
|
+
- **complete**:完成时提示选择执行方式,恢复工具,状态重置。
|
|
22
|
+
|
|
23
|
+
## plan 工具
|
|
24
|
+
|
|
25
|
+
模型经 `plan` tool 驱动阶段流转,actions:`list-template` / `select-template` / `create-template` / `complete` / `complete-cancelled` / `abort`。
|
|
26
|
+
|
|
27
|
+
## Plan File
|
|
28
|
+
|
|
29
|
+
Plan Mode 的产出物,存储在 `.xyz-harness/{slug}/plan.md`(slug 截断 30 字符)。含 YAML frontmatter 与模板章节。进入 plan mode 时自动扫描既有 plan 文件供续写。
|
|
30
|
+
|
|
31
|
+
## 模板
|
|
32
|
+
|
|
33
|
+
内置 5 个(`templates/`):`feature-plan` / `bugfix-plan` / `refactor-plan` / `implementation-plan` / `research-plan`。支持项目自定义模板(`listTemplates` / `loadTemplate` 按 projectDir 发现)。
|
|
34
|
+
|
|
35
|
+
## 依赖
|
|
36
|
+
|
|
37
|
+
peer 依赖 `@zhushanwen/pi-goal`(plan 完成后衔接 goal 驱动执行)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/pi-plan",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Lightweight plan mode for Pi coding agent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@earendil-works/pi-coding-agent": ">=0.73.0",
|
|
22
22
|
"typebox": "*",
|
|
23
23
|
"@earendil-works/pi-ai": "^0.84.4",
|
|
24
|
-
"@zhushanwen/pi-goal": "0.14.
|
|
24
|
+
"@zhushanwen/pi-goal": "0.14.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependenciesMeta": {
|
|
27
27
|
"@earendil-works/pi-ai": {
|