@gavin-hu/my-pi-agent 0.17.0 → 0.19.0

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 (274) hide show
  1. package/README.md +61 -45
  2. package/README.zh-CN.md +54 -42
  3. package/docs/extensions/README.md +34 -0
  4. package/docs/extensions/board.md +344 -0
  5. package/{extensions/bytefly/README.md → docs/extensions/bytefly.md} +465 -416
  6. package/{extensions/check/README.md → docs/extensions/check.md} +83 -68
  7. package/{extensions/context/README.md → docs/extensions/context.md} +40 -23
  8. package/docs/extensions/file-browse.md +554 -0
  9. package/{extensions/file-open/README.md → docs/extensions/file-open.md} +31 -23
  10. package/{extensions/file-read/README.md → docs/extensions/file-read.md} +47 -55
  11. package/{extensions/goal/README.md → docs/extensions/goal.md} +115 -131
  12. package/{extensions/job/README.md → docs/extensions/job.md} +66 -53
  13. package/{extensions/memory/README.md → docs/extensions/memory.md} +74 -63
  14. package/docs/extensions/plan.md +976 -0
  15. package/{extensions/question/README.md → docs/extensions/question.md} +54 -28
  16. package/{extensions/rewind/README.md → docs/extensions/rewind.md} +115 -122
  17. package/docs/extensions/session-bus.md +285 -0
  18. package/{extensions/subagent/README.md → docs/extensions/subagent.md} +166 -119
  19. package/docs/extensions/team.md +226 -0
  20. package/{extensions/todo/README.md → docs/extensions/todo.md} +85 -88
  21. package/{extensions/watch/README.md → docs/extensions/watch.md} +60 -38
  22. package/{extensions/web-access/README.md → docs/extensions/web-access.md} +93 -50
  23. package/{extensions/wechat/README.md → docs/extensions/wechat.md} +275 -192
  24. package/{extensions/worktree/README.md → docs/extensions/worktree.md} +115 -72
  25. package/extensions/board/commands.ts +87 -0
  26. package/extensions/board/config.ts +36 -0
  27. package/extensions/board/format.ts +72 -0
  28. package/extensions/board/index.ts +40 -0
  29. package/extensions/board/input.ts +54 -0
  30. package/extensions/board/join.ts +42 -0
  31. package/extensions/board/page.ts +312 -0
  32. package/extensions/board/result.ts +99 -0
  33. package/extensions/board/rows.ts +48 -0
  34. package/extensions/board/schema.ts +75 -0
  35. package/extensions/board/seat.ts +29 -0
  36. package/extensions/board/snapshot.ts +41 -0
  37. package/extensions/board/tools.ts +279 -0
  38. package/extensions/board/transport/router.ts +172 -0
  39. package/extensions/board/transport/server.ts +149 -0
  40. package/extensions/board/types.ts +54 -0
  41. package/extensions/board/view/actions.ts +306 -0
  42. package/extensions/board/view/client.ts +41 -0
  43. package/extensions/board/view/keys.ts +121 -0
  44. package/extensions/board/view/live.ts +397 -0
  45. package/extensions/board/view/page.ts +158 -0
  46. package/extensions/board/view/render.ts +496 -0
  47. package/extensions/board/view/styles.ts +211 -0
  48. package/extensions/board/view/team.ts +305 -0
  49. package/extensions/board/writes.ts +99 -0
  50. package/extensions/bytefly/notify/types.ts +1 -1
  51. package/extensions/bytefly/panel/commands.ts +40 -7
  52. package/extensions/bytefly/panel/settings-runtime.ts +0 -6
  53. package/extensions/bytefly/panel/settings.ts +11 -21
  54. package/extensions/bytefly/panel/tui/settings-view.ts +1 -1
  55. package/extensions/bytefly/picker/discovery.ts +0 -2
  56. package/extensions/bytefly/picker/types.ts +0 -2
  57. package/extensions/bytefly/update/check.ts +39 -0
  58. package/extensions/bytefly/update/format.ts +15 -0
  59. package/extensions/bytefly/update/register.ts +73 -34
  60. package/extensions/bytefly/update/state.ts +6 -3
  61. package/extensions/context/tui.ts +1 -1
  62. package/extensions/file-browse/{config.ts → config/config.ts} +13 -4
  63. package/extensions/file-browse/{files.ts → files/files.ts} +1 -14
  64. package/extensions/file-browse/{paths.ts → files/paths.ts} +1 -1
  65. package/extensions/file-browse/{git.ts → git/git.ts} +10 -3
  66. package/extensions/file-browse/index.ts +4 -4
  67. package/extensions/file-browse/{live.ts → live/live.ts} +54 -82
  68. package/extensions/file-browse/live/rev.ts +42 -0
  69. package/extensions/file-browse/{router.ts → transport/router.ts} +44 -17
  70. package/extensions/file-browse/transport/server.ts +110 -0
  71. package/extensions/file-browse/view/chrome.ts +83 -0
  72. package/extensions/file-browse/{client.ts → view/client.ts} +63 -1
  73. package/extensions/file-browse/view/diff-html.ts +94 -0
  74. package/extensions/file-browse/{html.ts → view/html.ts} +32 -158
  75. package/extensions/file-browse/{icons.ts → view/icons.ts} +1 -1
  76. package/extensions/file-browse/{live-client.ts → view/live-client.ts} +47 -1
  77. package/extensions/file-browse/{markdown.ts → view/markdown.ts} +7 -7
  78. package/extensions/file-browse/{raw-html.ts → view/raw-html.ts} +1 -1
  79. package/extensions/file-browse/{styles.ts → view/styles.ts} +31 -5
  80. package/extensions/file-browse/{tree.ts → view/tree.ts} +1 -1
  81. package/extensions/file-browse/{urls.ts → view/urls.ts} +1 -1
  82. package/extensions/file-read/schema.ts +2 -1
  83. package/extensions/goal/plan-route.ts +8 -2
  84. package/extensions/job/index.ts +15 -7
  85. package/extensions/memory/store.ts +12 -5
  86. package/extensions/plan/blocks.ts +23 -2
  87. package/extensions/plan/commands.ts +77 -21
  88. package/extensions/plan/feedback.ts +409 -63
  89. package/extensions/plan/index.ts +7 -5
  90. package/extensions/plan/plan-index.ts +44 -10
  91. package/extensions/plan/plan-text.ts +51 -24
  92. package/extensions/plan/plans.ts +162 -57
  93. package/extensions/plan/policy.ts +20 -12
  94. package/extensions/plan/review-prompt.ts +93 -0
  95. package/extensions/plan/review.ts +51 -95
  96. package/extensions/plan/runtime.ts +22 -10
  97. package/extensions/plan/sections.ts +112 -0
  98. package/extensions/plan/steps.ts +63 -95
  99. package/extensions/plan/tools/enter.ts +8 -3
  100. package/extensions/plan/tools/exit.ts +13 -19
  101. package/extensions/plan/tools/write.ts +8 -3
  102. package/extensions/plan/tools.ts +1 -1
  103. package/extensions/plan/tui.ts +29 -15
  104. package/extensions/plan/types.ts +29 -3
  105. package/extensions/plan/web-chrome.ts +2 -1
  106. package/extensions/plan/web-client.ts +122 -178
  107. package/extensions/plan/web-collab.ts +207 -0
  108. package/extensions/plan/web-comments.ts +269 -0
  109. package/extensions/plan/web-page.ts +96 -17
  110. package/extensions/plan/web-router.ts +109 -47
  111. package/extensions/plan/web-share-session.ts +191 -0
  112. package/extensions/plan/web-share.ts +169 -0
  113. package/extensions/plan/web-streams.ts +124 -0
  114. package/extensions/plan/web-tokens.ts +63 -0
  115. package/extensions/plan/web.ts +245 -151
  116. package/extensions/question/dialogs.ts +91 -1
  117. package/extensions/question/tools.ts +2 -1
  118. package/extensions/rewind/{commands.ts → commands/commands.ts} +5 -5
  119. package/extensions/rewind/{review.ts → commands/review.ts} +13 -13
  120. package/extensions/rewind/{rewind.ts → commands/rewind.ts} +6 -6
  121. package/extensions/rewind/{config.ts → config/config.ts} +1 -1
  122. package/extensions/rewind/index.ts +3 -3
  123. package/extensions/rewind/{policy.ts → state/policy.ts} +4 -4
  124. package/extensions/rewind/{runtime.ts → state/runtime.ts} +11 -11
  125. package/extensions/rewind/{snapshot-run.ts → state/snapshot-run.ts} +1 -1
  126. package/extensions/rewind/{timeline.ts → state/timeline.ts} +2 -2
  127. package/extensions/rewind/{format.ts → text/format.ts} +3 -3
  128. package/extensions/rewind/{git.ts → transport/git.ts} +2 -2
  129. package/extensions/rewind/{restore.ts → transport/restore.ts} +2 -2
  130. package/extensions/rewind/{snapshot.ts → transport/snapshot.ts} +1 -1
  131. package/extensions/rewind/{store.ts → transport/store.ts} +1 -1
  132. package/extensions/rewind/{checklist.ts → view/checklist.ts} +6 -6
  133. package/extensions/rewind/{hunk-picker.ts → view/hunk-picker.ts} +8 -8
  134. package/extensions/rewind/{path-picker.ts → view/path-picker.ts} +7 -7
  135. package/extensions/rewind/{review-tui.ts → view/review-tui.ts} +11 -11
  136. package/extensions/rewind/{rewind-tui.ts → view/rewind-tui.ts} +17 -11
  137. package/extensions/rewind/{status.ts → view/status.ts} +4 -4
  138. package/extensions/session-bus/commands.ts +113 -0
  139. package/extensions/session-bus/format.ts +101 -0
  140. package/extensions/session-bus/index.ts +75 -0
  141. package/extensions/session-bus/join-request.ts +40 -0
  142. package/extensions/session-bus/mail-watch.ts +134 -0
  143. package/extensions/session-bus/notice.ts +86 -0
  144. package/extensions/session-bus/overlap.ts +36 -0
  145. package/extensions/session-bus/protocol.ts +104 -0
  146. package/extensions/session-bus/resolve.ts +67 -0
  147. package/extensions/session-bus/result.ts +208 -0
  148. package/extensions/session-bus/rows.ts +171 -0
  149. package/extensions/session-bus/runtime.ts +466 -0
  150. package/extensions/session-bus/store.ts +365 -0
  151. package/extensions/session-bus/tools.ts +192 -0
  152. package/extensions/session-bus/tui.ts +394 -0
  153. package/extensions/session-bus/types.ts +98 -0
  154. package/extensions/subagent/agents.ts +9 -8
  155. package/extensions/subagent/invocation.ts +4 -2
  156. package/extensions/team/commands.ts +112 -0
  157. package/extensions/team/dispatch.ts +133 -0
  158. package/extensions/team/format.ts +105 -0
  159. package/extensions/team/index.ts +33 -0
  160. package/extensions/team/schema.ts +29 -0
  161. package/extensions/team/tools.ts +246 -0
  162. package/extensions/team/types.ts +48 -0
  163. package/extensions/watch/index.ts +15 -9
  164. package/extensions/web-access/fetch/page.ts +4 -1
  165. package/extensions/web-access/fetch/structured.ts +447 -0
  166. package/extensions/web-access/fetch/tool.ts +2 -1
  167. package/extensions/web-access/search/tool.ts +2 -1
  168. package/extensions/wechat/bridge.ts +76 -92
  169. package/extensions/wechat/{commands.ts → commands/commands.ts} +26 -18
  170. package/extensions/wechat/{doctor.ts → commands/doctor.ts} +5 -5
  171. package/extensions/wechat/{history.ts → commands/history.ts} +1 -1
  172. package/extensions/wechat/{login.ts → commands/login.ts} +3 -3
  173. package/extensions/wechat/{slash.ts → commands/slash.ts} +38 -2
  174. package/extensions/wechat/dialog/channels.ts +136 -0
  175. package/extensions/wechat/{interaction.ts → dialog/interaction.ts} +66 -51
  176. package/extensions/wechat/{prompt.ts → dialog/prompt.ts} +40 -25
  177. package/extensions/wechat/{remote-ui.ts → dialog/remote-ui.ts} +1 -1
  178. package/extensions/wechat/index.ts +10 -10
  179. package/extensions/wechat/{admission.ts → peer/admission.ts} +2 -2
  180. package/extensions/wechat/{peer-session.ts → peer/peer-session.ts} +2 -2
  181. package/extensions/wechat/{peer-worker.ts → peer/peer-worker.ts} +119 -56
  182. package/extensions/wechat/{presence.ts → peer/presence.ts} +11 -11
  183. package/extensions/wechat/{reply-pipeline.ts → peer/reply-pipeline.ts} +13 -5
  184. package/extensions/wechat/{credentials.ts → state/credentials.ts} +2 -2
  185. package/extensions/wechat/{state.ts → state/state.ts} +14 -2
  186. package/extensions/wechat/{format.ts → text/format.ts} +3 -3
  187. package/extensions/wechat/{notices.ts → text/notices.ts} +15 -7
  188. package/extensions/wechat/tools.ts +29 -12
  189. package/extensions/wechat/{client.ts → transport/client.ts} +26 -2
  190. package/extensions/wechat/{deliver.ts → transport/deliver.ts} +104 -40
  191. package/extensions/wechat/{inbound.ts → transport/inbound.ts} +5 -5
  192. package/extensions/wechat/{media.ts → transport/media.ts} +11 -5
  193. package/extensions/wechat/transport/outbound.ts +142 -0
  194. package/extensions/wechat/{poll.ts → transport/poll.ts} +3 -3
  195. package/extensions/wechat/types.ts +10 -1
  196. package/extensions/wechat/{login-screen.ts → view/login-screen.ts} +4 -4
  197. package/extensions/wechat/{status-screen.ts → view/status-screen.ts} +31 -26
  198. package/extensions/worktree/git.ts +5 -0
  199. package/extensions/worktree/guard.ts +3 -5
  200. package/extensions/worktree/registry.ts +11 -5
  201. package/extensions/worktree/status.ts +1 -3
  202. package/lib/README.md +12 -6
  203. package/lib/board/card.ts +290 -0
  204. package/lib/board/links.ts +117 -0
  205. package/lib/board/page-pointer.ts +256 -0
  206. package/lib/board/round-text.ts +72 -0
  207. package/lib/board/round.ts +89 -0
  208. package/lib/board/rules.ts +304 -0
  209. package/lib/board/session.ts +105 -0
  210. package/lib/board/store.ts +310 -0
  211. package/lib/board/view.ts +150 -0
  212. package/lib/errors.ts +12 -4
  213. package/lib/format.ts +13 -0
  214. package/lib/http/guard.ts +112 -0
  215. package/lib/http/index.ts +16 -5
  216. package/lib/http/router.ts +40 -13
  217. package/lib/http/serve.ts +234 -0
  218. package/lib/http/server.ts +29 -13
  219. package/lib/http/sink.ts +110 -0
  220. package/lib/http/token.ts +38 -0
  221. package/lib/interaction.ts +10 -0
  222. package/lib/notice.ts +29 -2
  223. package/lib/plan-entry.ts +7 -2
  224. package/lib/policy.ts +12 -2
  225. package/lib/qr.ts +64 -0
  226. package/lib/repo-key.ts +74 -0
  227. package/lib/report.ts +52 -33
  228. package/lib/requirements.ts +7 -9
  229. package/lib/session-label.ts +64 -0
  230. package/lib/session-roster.ts +130 -0
  231. package/lib/session-tool.ts +184 -0
  232. package/lib/tool-names.ts +25 -2
  233. package/lib/tui/README.md +16 -2
  234. package/lib/tui/dock-screen.ts +85 -17
  235. package/lib/tui/glyphs.ts +2 -0
  236. package/lib/tui/line-pane.ts +15 -4
  237. package/lib/tui/tool.ts +23 -4
  238. package/lib/web/README.md +5 -2
  239. package/lib/web/components.ts +6 -1
  240. package/lib/web/runtime.ts +7 -1
  241. package/lib/web/tokens.ts +25 -2
  242. package/package.json +27 -14
  243. package/skills/init/SKILL.md +80 -45
  244. package/skills/init/references/agents-md-quality.md +26 -2
  245. package/skills/init/references/interview-questions.md +36 -14
  246. package/skills/next/SKILL.md +77 -51
  247. package/skills/project-docs/SKILL.md +133 -0
  248. package/skills/project-docs/references/audit.md +131 -0
  249. package/skills/project-docs/references/changelog.md +105 -0
  250. package/skills/project-docs/references/discovery.md +127 -0
  251. package/skills/project-docs/references/readme.md +80 -0
  252. package/skills/project-docs/references/release.md +84 -0
  253. package/skills/project-docs/references/roadmap.md +93 -0
  254. package/skills/project-docs/scripts/state.ts +316 -0
  255. package/skills/refactor/SKILL.md +100 -125
  256. package/skills/refactor/references/handoff.md +35 -0
  257. package/skills/refactor/references/signals.md +54 -0
  258. package/skills/refactor/scripts/inventory.ts +587 -0
  259. package/extensions/file-browse/README.md +0 -467
  260. package/extensions/file-browse/server.ts +0 -134
  261. package/extensions/plan/README.md +0 -709
  262. package/extensions/plan/config.ts +0 -27
  263. package/extensions/wechat/outbound.ts +0 -100
  264. package/extensions/wechat/qrcode.ts +0 -46
  265. package/skills/changelog/SKILL.md +0 -148
  266. /package/extensions/file-browse/{diff.ts → text/diff.ts} +0 -0
  267. /package/extensions/file-browse/{fuzzy.ts → text/fuzzy.ts} +0 -0
  268. /package/extensions/file-browse/{palette.ts → view/palette.ts} +0 -0
  269. /package/extensions/rewind/{patch.ts → text/patch.ts} +0 -0
  270. /package/extensions/rewind/{paths.ts → text/paths.ts} +0 -0
  271. /package/extensions/rewind/{queue.ts → transport/queue.ts} +0 -0
  272. /package/extensions/rewind/{temp-index.ts → transport/temp-index.ts} +0 -0
  273. /package/extensions/wechat/{lock.ts → state/lock.ts} +0 -0
  274. /package/extensions/wechat/{channel.ts → text/channel.ts} +0 -0
package/README.md CHANGED
@@ -15,7 +15,7 @@ This page is the catalog and the setup instructions. For how to use a feature
15
15
  the keys, the commands, and what you should see — start with the
16
16
  [user guide](./docs/user-guide/).
17
17
 
18
- ![A terminal window running the Pi TUI with the bytefly header, hint row, context and loaded extensions, a turn separator, and the status bar](assets/chrome.png)
18
+ ![A terminal window running the Pi TUI: the bytefly header naming Pi and bytefly's versions, three key-hint rows, a nameplated message with its answer and an edit diff behind the rail, a finished-jobs notice, the turn rule, the goal and todo rails, and the two-line footer](assets/screens/chrome.png)
19
19
 
20
20
  ## Contents
21
21
 
@@ -36,10 +36,11 @@ want the agent to *think first and work safely*:
36
36
  plan file that the agent then follows step by step.
37
37
  - **Delegate and parallelize.** Run specialist subagents in their own Pi
38
38
  processes, push a long build into a background job, and let a watcher tail a
39
- log until it matters — all while you keep the thread.
39
+ log until it matters — then run several sessions on one repository through a
40
+ shared bus, each owning its slice, all while you keep the thread.
40
41
  - **Never wreck the checkout.** Isolation is one command: the task moves onto its
41
- own branch in a `git worktree`, and every prompt is snapshotted so a bad turn
42
- is one `/rewind` away.
42
+ own branch in a `git worktree`, and each prompt's first change is snapshotted,
43
+ so a bad turn is one `/rewind` away.
43
44
  - **Remember across sessions.** Durable notes live in plain markdown that you
44
45
  can read, edit, and version.
45
46
  - **Reach the web and your files.** Search, fetch, browse, open, and read
@@ -47,7 +48,7 @@ want the agent to *think first and work safely*:
47
48
  through a bridge to the live session.
48
49
 
49
50
  Everything is optional and independently toggleable. Nothing is forked, and no
50
- installed Pi file is modified: Pi discovers the resources through the `pi`
51
+ installed Pi file is written to: Pi discovers the resources through the `pi`
51
52
  manifest in [`package.json`](./package.json), so the package upgrades with Pi
52
53
  like any other.
53
54
 
@@ -63,8 +64,8 @@ pi install npm:@gavin-hu/my-pi-agent
63
64
  pinned release, a project-local install, and a trial that writes nothing — plus
64
65
  the fit decision, the first workflows, and how to remove the pack.
65
66
 
66
- `git` on `PATH` is needed by [`worktree`](./extensions/worktree/) and
67
- [`rewind`](./extensions/rewind/); everything else degrades or disables cleanly,
67
+ `git` on `PATH` is needed by [`worktree`](./docs/extensions/worktree.md) and
68
+ [`rewind`](./docs/extensions/rewind.md); everything else degrades or disables cleanly,
68
69
  and `/bytefly doctor` names what is missing, including optional runtime pieces.
69
70
  Windows, macOS, and Linux all work, and the full check suite runs on each in CI.
70
71
 
@@ -74,7 +75,7 @@ Then, from inside Pi:
74
75
  every loaded extension with its runtime health, enables or disables one, and
75
76
  clears a project override with `x`.
76
77
  - `/bytefly settings` opens the control center's Settings section: one flat list
77
- of the thirteen preferences a session changes, each with its value beside the
78
+ of the twelve preferences a session changes, each with its value beside the
78
79
  label, `Space`/`Enter` to change one and `Tab` for Global/Project scope. Every
79
80
  other key is a `bytefly.json` edit, listed in the configuration reference.
80
81
  - `/bytefly skills` opens the control center's Skills section: one row per Pi
@@ -86,59 +87,66 @@ Then, from inside Pi:
86
87
  - `/bytefly update` re-runs the package update check now and reports the
87
88
  updateable packages, this package's version and release URL, or a skip.
88
89
  - `/plan <task>` starts a task in read-only planning mode.
89
- - `/skill:init` creates or updates `AGENTS.md` through a short built-in interview and a plan you review first.
90
+ - `/skill:init` creates or updates the instruction file Pi reads through a short
91
+ built-in interview and a plan you review first.
90
92
 
91
93
  One thing the pack does on its own: once per interactive session, `bytefly`
92
94
  asks Pi's package manager which configured packages are behind, suppresses Pi's
93
95
  own startup update blocks, and posts one themed notice naming
94
96
  `pi update --extensions`, plus one for a newer Pi that names `pi update` and the
95
97
  changelog; a new version also marks the header — this package's, and Pi's own.
96
- Nothing about the session is sent — Pi's own release request is only re-rendered —
97
- and `PI_OFFLINE` skips the check;
98
+ Nothing about the session is sent: Pi's own release request is re-rendered, and
99
+ this package's newest version comes from one fixed `GET` of npm's `latest`
100
+ document. `PI_OFFLINE` skips the check;
98
101
  [`docs/security.md`](./docs/security.md) covers the trust boundaries.
99
102
 
100
103
  ## What you get
101
104
 
102
- 18 extensions, 3 packaged skills, and 2 themes, grouped by what you are trying
103
- to do. Each extension's own `README.md` has the full tool and command surface.
105
+ 21 extensions, 4 packaged skills, and 2 themes, grouped by the promises the
106
+ [roadmap](./ROADMAP.md) tracks; the [guide](./docs/user-guide/) covers the same
107
+ ground chapter by chapter. Each extension's own page in `docs/extensions/` has
108
+ the full tool and command surface, opening with its capabilities.
104
109
 
105
110
  ### Plan and delegate
106
111
 
107
112
  | Extension | Tools and commands | What it does |
108
113
  |---|---|---|
109
- | [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `cancel_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | Read-only planning: the model investigates, saves a plan under `.pi/plans`, and you approve it before anything is written. Review in the TUI, or open it in a browser to leave inline comments. The `init` skill uses the same review to create or update a project's `AGENTS.md`. |
110
- | [`check`](./extensions/check/) | `run_check`, `/check` | Detect the project's test, lint, or typecheck command (or take `check.command`), run it in a supervised process, and turn failures into a navigable `file:line` list. |
111
- | [`subagent`](./extensions/subagent/) | `subagent`, `/agents` | Delegate a task to a specialist agent (`explorer`, `planner`, `reviewer`, `worker`, `researcher`, `tester`, `debugger`, `documenter`) in its own Pi process — single, parallel, chained, or in the background, with a footer chip while it runs and a finish notice. |
112
- | [`todo`](./extensions/todo/) | `todo`, `/todos` | A persistent task list (`pending` / `in_progress` / `completed`) with a one-line widget. |
113
- | [`goal`](./extensions/goal/) | `goal`, `/goal` | A persistent session objective, kept in a widget and restated before each turn. |
114
- | [`question`](./extensions/question/) | `ask_user_question` | Ask you one or more structured questions (labelled options plus free-form "Other") and wait. |
115
- | [`job`](./extensions/job/) | `job`, `/jobs` | Run long-lived shell commands in the background; inspect logs, wait, or kill them. |
116
- | [`watch`](./extensions/watch/) | `watch`, `/watch` | Tail a file or command output, match lines against patterns, and alert you or hand matching lines to the agent. |
117
- | [`context`](./extensions/context/) | `/context` | Show where the context window goes — system prompt, tool definitions, conversation by role, injected notes — and compact from the report with the before and after numbers. |
114
+ | [`plan`](./docs/extensions/plan.md) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `cancel_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | Read-only planning: the model investigates, saves a plan under `~/.pi/agent/plans/<repo-key>` — one store per repository, shared by its worktrees — and you approve it before anything is written. Review in the TUI, or open it in a browser to leave inline comments: the page follows the plan file live, and you can hand one reviewer link per teammate so each comments under their own name. The `init` skill uses the same review to create or update a project's `AGENTS.md`. |
115
+ | [`check`](./docs/extensions/check.md) | `run_check`, `/check` | Detect the project's test, lint, or typecheck command (or take `check.command`), run it in a supervised process, and turn failures into a navigable `file:line` list. |
116
+ | [`subagent`](./docs/extensions/subagent.md) | `subagent`, `/agents` | Delegate a task to a specialist agent (`explorer`, `planner`, `reviewer`, `worker`, `researcher`, `tester`, `debugger`, `documenter`) in its own Pi process — single, parallel, chained, or in the background, with a footer chip while it runs and a finish notice. |
117
+ | [`todo`](./docs/extensions/todo.md) | `todo`, `/todos` | A persistent task list (`pending` / `in_progress` / `completed`) with a one-line widget. |
118
+ | [`goal`](./docs/extensions/goal.md) | `goal`, `/goal` | A persistent session objective, kept in a widget and restated before each turn. |
119
+ | [`question`](./docs/extensions/question.md) | `ask_user_question` | Ask you one or more structured questions (labelled options plus free-form "Other") and wait. |
120
+ | [`job`](./docs/extensions/job.md) | `job`, `/jobs` | Run long-lived shell commands in the background; inspect logs, wait, or kill them. |
121
+ | [`watch`](./docs/extensions/watch.md) | `watch`, `/watch` | Tail a file or command output, match lines against patterns, and alert you or hand matching lines to the agent. |
122
+ | [`session-bus`](./docs/extensions/session-bus.md) | `session`, `/sessions` (screen) | Coordinate parallel Pi sessions on one repository: discover peers, exchange short messages/events, consume an inbox, or claim paths before editing, with `/sessions` as a live board of peers, unread mail, and claims. Local, pull-based by default, with an opt-in inbox watch that raises this session's turn once it is idle; it never spawns an agent. |
123
+ | [`board`](./docs/extensions/board.md) | `board`, `/board` | One shared feature board per repository: a card per feature, which any session claims, moves, edits, notes, and finishes, and one loopback page that shows the same cards live in a **Board** and a **Team** tab. The page serves as the seat `team-lead`, so a second session opens it read-only instead of starting a rival one. A card can carry a priority, name the cards it waits on, and be handed to a teammate from the dashboard. Steps stay in the owner's plan and `todo`; a card is the feature, its owner, and the history that explains it. `board.port` in `bytefly.json` pins the page's port, so a bookmarked URL survives a restart. |
124
+ | [`team`](./docs/extensions/team.md) | `team`, `/team` | The lead's round over the same board. `/team join <label>` puts a session on the team, and `/board` does it for the lead as `team-lead`; then `assign` hands a feature to a running session, `offer` hands one to whoever is free — a broadcast that writes nothing, claimed by the first taker — and `reclaim` takes a card back to To do. A result says who will be woken for it and who will read it at their next turn, `/team` prints the round in the terminal without a browser, and nothing is spawned. |
125
+ | [`context`](./docs/extensions/context.md) | `/context` | Show where the context window goes — system prompt, tool definitions, conversation by role, injected notes — and compact from the report with the before and after numbers. |
118
126
 
119
127
  ### Keep your work safe
120
128
 
121
129
  | Extension | Tools and commands | What it does |
122
130
  |---|---|---|
123
- | [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree` (screen), `/worktree enter|exit|prune`, `--worktree` | Work inside an isolated `git worktree` on its own branch; the built-in read/write/edit/bash tools follow, and cleanup refuses to throw work away. |
124
- | [`rewind`](./extensions/rewind/) | `/rewind`, `/review`, `↺ N` status chip | Snapshot the repo on every prompt under `refs/pi/rewind`, restore code, conversation, or both, and review the latest turn's changes before reverting a file. |
125
- | [`memory`](./extensions/memory/) | `memory`, `/memory` | Durable cross-session notes as human-editable markdown, injected into each run and managed through the `/memory` picker. |
131
+ | [`worktree`](./docs/extensions/worktree.md) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree` (screen), `/worktree enter\|exit\|prune`, `--worktree` | Work inside an isolated `git worktree` on its own branch; the built-in read/write/edit/bash tools follow, and cleanup refuses to throw work away. |
132
+ | [`rewind`](./docs/extensions/rewind.md) | `/rewind`, `/review`, `↺ N` status chip | Snapshot the repo before each prompt's first change, under `refs/pi/rewind`, restore code, conversation, or both, and review the latest turn's changes before reverting a file. |
133
+ | [`memory`](./docs/extensions/memory.md) | `memory`, `/memory` | Durable cross-session notes as human-editable markdown, injected into each run and managed through the `/memory` picker. |
126
134
 
127
135
  ### Reach the world
128
136
 
129
137
  | Extension | Tools and commands | What it does |
130
138
  |---|---|---|
131
- | [`web-access`](./extensions/web-access/) | `web_search`, `web_fetch` | Search the web (keyless DuckDuckGo by default, optional SearXNG or Brave) and fetch a page as readable text, with paging, `find`, per-hop SSRF checks, and optional PDF support. |
132
- | [`file-browse`](./extensions/file-browse/) | `/browse` | Start a loopback, read-only file browser rooted at the working directory, with Markdown preview, a fuzzy quick-open palette, and live status for a page left open. |
133
- | [`file-read`](./extensions/file-read/) | `read_doc` | Extract text from a local PDF, DOCX, DOC, ODT, RTF, or XLSX in process, paged. |
134
- | [`file-open`](./extensions/file-open/) | `/open`, `open_path` | Open or reveal a file or directory in the OS-native application. |
135
- | [`wechat`](./extensions/wechat/) | `/wechat`, `send_wechat` | Bridge a WeChat chat to the live session over the Weixin iLink bot API; inbound text, images, and files become turns. |
139
+ | [`web-access`](./docs/extensions/web-access.md) | `web_search`, `web_fetch` | Search the web (keyless DuckDuckGo by default, optional SearXNG or Brave) and fetch a page as readable text, with paging, `find`, per-hop SSRF checks, a JSON/CSV/XML body rendered as a table or a tree, and optional PDF support. |
140
+ | [`file-browse`](./docs/extensions/file-browse.md) | `/browse` | Start a loopback, read-only file browser rooted at the working directory, with Markdown preview, a fuzzy quick-open palette, a `path:12-30` reference copied from a selection, live status for a page left open, and a reload hint when the folder it lists changes. |
141
+ | [`file-read`](./docs/extensions/file-read.md) | `read_doc` | Extract text from a local PDF, DOCX, DOC, ODT, RTF, or XLSX in process, paged. |
142
+ | [`file-open`](./docs/extensions/file-open.md) | `/open`, `open_path` | Open or reveal a file or directory in the OS-native application. |
143
+ | [`wechat`](./docs/extensions/wechat.md) | `/wechat`, `send_wechat` | Bridge a WeChat chat to the live session over the Weixin iLink bot API; inbound text, images, and files become turns. |
136
144
 
137
145
  ### Chrome and upkeep
138
146
 
139
147
  | Extension | Tools and commands | What it does |
140
148
  |---|---|---|
141
- | [`bytefly`](./extensions/bytefly/) | `/bytefly` (with the `doctor`, `settings`, `skills`, and `update` subcommands), `run_doctor` | The visible layer: a themed header with a width-adaptive footer, a live run line on Pi's working row (tool, tool count, and elapsed time), and a transcript where every tool block leads with its call line and rails its result under it. `/bytefly` switches extensions and skills and holds the curated settings; opt-in `notify` raises OS notifications when a run, a job, or a question needs you, and Pi's own startup update blocks become themed notices and header markers. `bytefly.json` is the config document every extension reads. |
149
+ | [`bytefly`](./docs/extensions/bytefly.md) | `/bytefly` (with the `doctor`, `settings`, `skills`, `update`, and `upgrade` subcommands), `run_doctor` | The visible layer: a themed header with a width-adaptive footer, a live run line on Pi's working row (tool, tool count, and elapsed time), and a transcript where every tool block leads with its call line and rails its result under it. `/bytefly` switches extensions and skills and holds the curated settings, and `/bytefly upgrade` installs a pending update through Pi's own package manager behind a confirmation; opt-in `notify` raises OS notifications when a run, a job, or a question needs you, and Pi's own startup update blocks become themed notices and header markers. `bytefly.json` is the config document every extension reads. |
142
150
 
143
151
  ### Skills
144
152
 
@@ -148,10 +156,10 @@ advertised to the model, and its instructions load only when the task matches
148
156
 
149
157
  | Skill | What it does |
150
158
  |---|---|
151
- | [`init`](./skills/init/SKILL.md) | Creates or updates a project's `AGENTS.md` through a built-in interactive interview and plan review, from repository evidence. |
152
- | [`refactor`](./skills/refactor/SKILL.md) | Audits a project or path for refactoring opportunities: duplication, oversized modules, coupling, drift, and high-churn code with weak tests. Returns a ranked shortlist with evidence and verification commands; discovery is read-only. |
153
- | [`changelog`](./skills/changelog/SKILL.md) | Records one user-visible bullet in the same commit as the change, audits commits since the last tag for missing or weak entries, and curates a release section from the project's own rules. |
154
- | [`next`](./skills/next/SKILL.md) | Triages what to do next — loose work, a broken or unfinished promise — from the tree or from this conversation (`/skill:next session`), with the words and a path after the command saying what to ask and where to look. Read-only, and capped at a short ranked list with evidence and the command that starts each. |
159
+ | [`init`](./skills/init/SKILL.md) | Creates or updates the instruction file Pi actually reads (`AGENTS.md`, or `AGENTS.override.md` when it shadows it) through a built-in interactive interview and plan review, deriving commands, generated paths, packages, and purpose from repository evidence. |
160
+ | [`refactor`](./skills/refactor/SKILL.md) | Audits a project or path for refactoring opportunities: duplication, oversized modules, coupling, drift, and high-churn code with weak tests. A bundled `scripts/inventory.ts` measures sizes, fan-in, churn, and test proximity so a finding is a number with a source, and the ranked shortlist has evidence and verification commands; it then carries the candidate you choose through a behaviour-preserving refactor, and the audit itself is read-only. |
161
+ | [`project-docs`](./skills/project-docs/SKILL.md) | Keeps a project's documents telling the truth about the code: a read-only audit of the front door, the roadmap, the contributor path, and the changelog against the tree and against each other, then one mode per act that writes — a changelog bullet in the same commit as the change, a release section curated from the project's own rules, a shipped roadmap item deleted with the rest renumbered, and the front door's catalog, counts, and examples synced. Discovers each project's category names, scope spelling, item form, and guards rather than assuming a template, and a bundled `scripts/state.ts` prints the changelog's tag, window, and unreleased categories. |
162
+ | [`next`](./skills/next/SKILL.md) | Suggests the next todos by priority — loose work, a broken or unfinished promise — from this conversation once it has done work, and from the tree only when it is empty, with the words and a path after the command saying what to ask and where to look. Read-only, and capped at a short numbered list with evidence and the command that starts each. |
155
163
 
156
164
  ### Themes
157
165
 
@@ -167,12 +175,16 @@ README use `bytefly-dark`.
167
175
 
168
176
  <table>
169
177
  <tr>
170
- <td width="50%"><img src="assets/todo.png" alt="The /todos screen: a Todos title rule, a 3/7 completed summary, and the list with check, spinner, and circle glyphs" width="100%"></td>
171
- <td width="50%"><img src="assets/question.png" alt="The ask_user_question dialog: Auth and Scope tabs, a question, four numbered options with descriptions, and the navigation hint" width="100%"></td>
178
+ <td width="50%"><img src="assets/screens/todo.png" alt="The /todos screen: a Todos title rule, a 3/7 completed summary, and the list with check, spinner, and circle glyphs" width="100%"></td>
179
+ <td width="50%"><img src="assets/screens/question.png" alt="The ask_user_question dialog: Auth and Scope tabs, a question, four numbered options with descriptions, and the navigation hint" width="100%"></td>
172
180
  </tr>
173
181
  <tr>
174
- <td width="50%"><img src="assets/job.png" alt="The /jobs screen: a summary line, the job rows with status glyphs and elapsed times, and the focused job's command, cwd, and last output line" width="100%"></td>
175
- <td width="50%"><img src="assets/rewind.png" alt="The /rewind screen: prompt rows newest first, a diamond marking prompts with a code snapshot, and the focused prompt's snapshot detail" width="100%"></td>
182
+ <td width="50%"><img src="assets/screens/job.png" alt="The /jobs screen: a summary line, the job rows with status glyphs and elapsed times, and the focused job's command, cwd, and last output line" width="100%"></td>
183
+ <td width="50%"><img src="assets/screens/rewind.png" alt="The /rewind screen: prompt rows newest first, a diamond marking prompts with a code snapshot, and a detail line naming the snapshot the focused prompt holds" width="100%"></td>
184
+ </tr>
185
+ <tr>
186
+ <td width="50%"><img src="assets/screens/session.png" alt="The /sessions screen: a counts summary, session rows with unread and claim counts, the focused session's cwd, claims, and identity, and the Tab scope and watch hints" width="100%"></td>
187
+ <td width="50%"><img src="assets/screens/watch.png" alt="The /watch screen: a summary line and watcher rows with live match counts and the focused watcher's pattern and source" width="100%"></td>
176
188
  </tr>
177
189
  </table>
178
190
 
@@ -184,7 +196,7 @@ each tool's own renderer (or bytefly's generic fallback): the user nameplate and
184
196
  a notice, Pi's built-ins, and every tool this package registers. The rail glyph
185
197
  is the `chrome.rail` setting.
186
198
 
187
- ![A full-page reference of every tool block: the user nameplate, a notice, the turn rule, Pi's read, write, edit, bash, grep, find, and ls renderers, and every package tool — todo, goal, memory, job, watch, subagent, web_search, web_fetch, read_doc, open_path, run_doctor, run_check, send_wechat, ask_user_question, the plan tools, and the worktree tools](assets/tool-renderings.png)
199
+ ![A full-page reference of every tool block: the user nameplate, a notice, the turn rule, Pi's read, write, edit, bash, grep, find, and ls renderers, and every package tool — todo, goal, memory, job, watch, subagent, web_search, web_fetch, read_doc, open_path, run_doctor, run_check, send_wechat, ask_user_question, session, board, team, the plan tools, and the worktree tools](assets/screens/tool-renderings.png)
188
200
 
189
201
  `bun run screenshot:tools` regenerates it; `bun run screenshot:tool-pngs` writes
190
202
  one image per tool under [`assets/tools/`](./assets/tools).
@@ -194,10 +206,12 @@ each: the first run, the keys that matter, and what to expect on screen.
194
206
 
195
207
  ## Configuration
196
208
 
197
- Most extensions need no configuration. Every setting lives in one shared
198
- document, `bytefly.json`, read from `<agent-dir>/bytefly.json` and merged with
199
- `<cwd>/.pi/bytefly.json` (project wins), under a top-level section named for the
200
- extension. Each extension's `README.md` covers the behaviour around its keys, and
209
+ Most extensions need no configuration. Every extension setting lives in one
210
+ shared document, `bytefly.json`, read from `<agent-dir>/bytefly.json` and
211
+ merged with `<cwd>/.pi/bytefly.json` (project wins), under a top-level section
212
+ named for the extension. Each extension's page under `docs/extensions/` covers
213
+ the behaviour
214
+ around its keys, and
201
215
  [`docs/configuration.md`](./docs/configuration.md) has the resolution rules, the
202
216
  settings screen walkthrough, and every section's keys with their type, default,
203
217
  and bounds.
@@ -220,10 +234,12 @@ stops the factories from registering; to drop the whole package, use Pi's
220
234
  |---|---|
221
235
  | [User guide](./docs/user-guide/) | A chaptered manual: install, every feature, settings, troubleshooting, and a command reference. |
222
236
  | [Configuration](./docs/configuration.md) | Resolution, the settings screen, and every `bytefly.json` key with its default and bounds. |
223
- | [Architecture](./docs/architecture.md) | The load path, runtime model, state, process shapes, and where new code belongs. |
237
+ | [Architecture](./docs/architecture.md) | The target shape: the load path, the extension contract, the turn, state, layers, lifetimes, and where a change belongs. |
238
+ | [Extension docs](./docs/extensions/) | One page per extension, opening with its capabilities: the tool and command surface, the integration contract, and the design notes. |
224
239
  | [Development](./docs/development.md) | Local setup, checks, tests, cross-platform notes, and the release process. |
225
240
  | [Security](./docs/security.md) | Trust boundaries for the loopback and remote surfaces. |
226
241
  | [Roadmap](./ROADMAP.md) | Where the pack is going, grouped by the README's promises, with the evidence behind each item. |
242
+ | [Documentation index](./docs/README.md) | The map of everything: the guides, and the deep contracts behind them, by audience. |
227
243
 
228
244
  ## Contributing
229
245
 
package/README.zh-CN.md CHANGED
@@ -13,7 +13,7 @@
13
13
  本页是目录与安装说明。要了解某个功能怎么用 —— 按键、命令以及应有的效果 ——
14
14
  请先看[用户指南](./docs/user-guide/)。
15
15
 
16
- ![一个运行 Pi TUI 的终端窗口,包含 bytefly 头部、提示行、上下文与已加载扩展、回合分隔线以及状态栏](assets/chrome.png)
16
+ ![一个运行 Pi TUI 的终端窗口:bytefly 头部标出 Pi 与 bytefly 的版本、三行按键提示、带名板的消息及其回答与编辑差异(位于竖线内)、后台任务完成通知、回合分隔线、目标与待办栏,以及两行页脚](assets/screens/chrome.png)
17
17
 
18
18
  ## 目录
19
19
 
@@ -33,14 +33,15 @@ Pi 提供一个精简而锐利的内核。这个包是在其之上的一层,
33
33
  - **先规划,再执行。** 只读的规划模式把一次任务变成一份可审阅的计划文件,智能体
34
34
  随后按步骤执行。
35
35
  - **委派与并行。** 在各自的 Pi 进程中运行专职子智能体,把耗时构建交给后台任务,
36
- 让 watcher 盯住日志直到出现关键行 —— 你继续把握主线。
36
+ 让 watcher 盯住日志直到出现关键行,还能让同一仓库上的多个会话通过共享总线协作、
37
+ 各自负责自己的一摊 —— 你继续把握主线。
37
38
  - **绝不搞乱检出区。** 隔离只需一条命令:任务切到自己分支的 `git worktree` 中,
38
- 每次提示还会生成快照,因此一次糟糕的回合只需一个 `/rewind` 就能回退。
39
+ 每次提示的首次改动都会生成快照,因此一次糟糕的回合只需一个 `/rewind` 就能回退。
39
40
  - **跨会话记忆。** 持久笔记以纯 Markdown 保存,可读、可改、可纳入版本控制。
40
41
  - **连通网络与文件。** 在会话内搜索、抓取、浏览、打开和读取文档与表格,还可通过桥接
41
42
  在微信里直接回答当前会话。
42
43
 
43
- 一切都是可选的,且可独立开关。没有任何东西被分叉,也没有修改已安装的 Pi 文件:
44
+ 一切都是可选的,且可独立开关。没有任何东西被分叉,也没有写入任何已安装的 Pi 文件:
44
45
  Pi 通过 [`package.json`](./package.json) 里的 `pi` manifest 发现这些资源,因此
45
46
  该包能像其他包一样随 Pi 一起升级。
46
47
 
@@ -55,8 +56,8 @@ pi install npm:@gavin-hu/my-pi-agent
55
56
  [用户指南](./docs/user-guide/) 介绍其余安装方式——git、固定版本、
56
57
  仅项目本地安装,以及不写入任何内容的试用——还有适用性判断、首个工作流和移除方式。
57
58
 
58
- `git` 需在 `PATH` 上,供 [`worktree`](./extensions/worktree/) 与
59
- [`rewind`](./extensions/rewind/) 使用;其余部分会优雅降级或禁用,
59
+ `git` 需在 `PATH` 上,供 [`worktree`](./docs/extensions/worktree.md) 与
60
+ [`rewind`](./docs/extensions/rewind.md) 使用;其余部分会优雅降级或禁用,
60
61
  `/bytefly doctor` 会指出缺少什么,包括可选的运行时组件。
61
62
  Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都会执行。
62
63
 
@@ -64,7 +65,7 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
64
65
 
65
66
  - `/bytefly [extension] [refresh]` 打开控制中心的 Extensions 区,列出每个已加载扩展
66
67
  及其运行时健康状况,启用或禁用一个扩展,并用 `x` 清除项目级覆盖。
67
- - `/bytefly settings` 打开控制中心的 Settings 区:一次会话会改动的十三项设置排成
68
+ - `/bytefly settings` 打开控制中心的 Settings 区:一次会话会改动的十二项设置排成
68
69
  一列,值紧跟在名称之后;用 `Space`/`Enter` 修改,用 `Tab` 切换 Global/Project
69
70
  作用域。其余键都是 `bytefly.json` 编辑,见配置参考。
70
71
  - `/bytefly skills` 打开控制中心的 Skills 区:每个 Pi 技能一行,带启用复选框与
@@ -74,57 +75,62 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
74
75
  - `/bytefly update` 立即重跑包更新检查,报告可更新的包、本包版本与 release URL,
75
76
  或跳过原因。
76
77
  - `/plan <任务>` 以只读规划模式开始一个任务。
77
- - `/skill:init` 通过内置的简短访谈和先审阅的计划创建或更新 `AGENTS.md`。
78
+ - `/skill:init` 通过内置的简短访谈和先审阅的计划创建或更新 Pi 实际读取的指令文件。
78
79
 
79
80
  还有一件包会自行做的事:每次交互式会话启动时,`bytefly` 询问 Pi 的包管理器
80
81
  哪些已配置的包有更新,抑制 Pi 自己的启动更新块,并用主题化 notice 列出它们
81
82
  和 `pi update --extensions`;Pi 自身的新版本也由它绘制,提示 `pi update` 与
82
- changelog。新版本还会标在头部 —— 本包的与 Pi 自己的。不会发送任何会话内容
83
- (Pi 自己的版本请求只是被重新绘制),`PI_OFFLINE` 可跳过检查;信任边界见
83
+ changelog。新版本还会标在头部 —— 本包的与 Pi 自己的。不会发送任何会话内容:
84
+ Pi 自己的版本请求只是被重新绘制,本包的最新版本则来自一次固定的 npm
85
+ `latest` 请求,`PI_OFFLINE` 可跳过检查;信任边界见
84
86
  [`docs/security.md`](./docs/security.md)。
85
87
 
86
88
  ## 包含内容
87
89
 
88
- 18 个扩展、4 个随包技能,以及 2 个主题,按你想达成的目标分组。每个扩展自己的 `README.md`
89
- 提供完整的工具与命令说明。
90
+ 21 个扩展、4 个随包技能,以及 2 个主题,按 [路线图](./ROADMAP.md) 追踪的承诺分组;
91
+ [用户指南](./docs/user-guide/) 按章节讲述同样的内容。每个扩展在 `docs/extensions/`
92
+ 下的页面提供完整的工具与命令说明,并以能力表开头。
90
93
 
91
94
  ### 规划与委派
92
95
 
93
96
  | 扩展 | 工具与命令 | 说明 |
94
97
  |---|---|---|
95
- | [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `cancel_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `.pi/plans` 下,你在写入任何内容前先批准。可在 TUI 中审阅,或在浏览器中打开以留下行内评论。`init` 技能复用同一审阅流程来创建或更新项目的 `AGENTS.md`。 |
96
- | [`check`](./extensions/check/) | `run_check`, `/check` | 检测项目的测试、lint 或类型检查命令(或使用 `check.command`),在受监管的进程中运行,并把失败整理成可导航的 `file:line` 列表。 |
97
- | [`subagent`](./extensions/subagent/) | `subagent`, `/agents` | 把任务委派给专职智能体(`explorer`、`planner`、`reviewer`、`worker`、`researcher`、`tester`、`debugger`、`documenter`),运行在它自己的 Pi 进程中 —— 单个、并行、链式或在后台运行;后台运行时在页脚显示数量,完成后发出提示。 |
98
- | [`todo`](./extensions/todo/) | `todo`, `/todos` | 持久任务列表(`pending` / `in_progress` / `completed`),配一行式 widget。 |
99
- | [`goal`](./extensions/goal/) | `goal`, `/goal` | 持久会话目标,保存在 widget 中,并在每个回合前重述。 |
100
- | [`question`](./extensions/question/) | `ask_user_question` | 向你提出一个或多个结构化问题(带标签的选项外加自由填写的“其他”)并等待回答。 |
101
- | [`job`](./extensions/job/) | `job`, `/jobs` | 在后台运行长时 shell 命令;查看日志、等待或结束它们。 |
102
- | [`watch`](./extensions/watch/) | `watch`, `/watch` | 跟踪文件或命令输出,按模式匹配行,并提醒你或把匹配的行交给智能体。 |
103
- | [`context`](./extensions/context/) | `/context` | 显示上下文窗口的去向 —— 系统提示、工具定义、按角色拆分的对话、注入的笔记 —— 并从报告中触发压缩,给出压缩前后的数字。 |
98
+ | [`plan`](./docs/extensions/plan.md) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `cancel_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `~/.pi/agent/plans/<repo-key>` 下(每个仓库一份,各 worktree 共享),你在写入任何内容前先批准。可在 TUI 中审阅,或在浏览器中打开以留下行内评论:页面会跟随计划文件实时更新,你也可以给每位同事各一个审阅链接,各自以绑定的名义评论。`init` 技能复用同一审阅流程来创建或更新项目的 `AGENTS.md`。 |
99
+ | [`check`](./docs/extensions/check.md) | `run_check`, `/check` | 检测项目的测试、lint 或类型检查命令(或使用 `check.command`),在受监管的进程中运行,并把失败整理成可导航的 `file:line` 列表。 |
100
+ | [`subagent`](./docs/extensions/subagent.md) | `subagent`, `/agents` | 把任务委派给专职智能体(`explorer`、`planner`、`reviewer`、`worker`、`researcher`、`tester`、`debugger`、`documenter`),运行在它自己的 Pi 进程中 —— 单个、并行、链式或在后台运行;后台运行时在页脚显示数量,完成后发出提示。 |
101
+ | [`todo`](./docs/extensions/todo.md) | `todo`, `/todos` | 持久任务列表(`pending` / `in_progress` / `completed`),配一行式 widget。 |
102
+ | [`goal`](./docs/extensions/goal.md) | `goal`, `/goal` | 持久会话目标,保存在 widget 中,并在每个回合前重述。 |
103
+ | [`question`](./docs/extensions/question.md) | `ask_user_question` | 向你提出一个或多个结构化问题(带标签的选项外加自由填写的“其他”)并等待回答。 |
104
+ | [`job`](./docs/extensions/job.md) | `job`, `/jobs` | 在后台运行长时 shell 命令;查看日志、等待或结束它们。 |
105
+ | [`watch`](./docs/extensions/watch.md) | `watch`, `/watch` | 跟踪文件或命令输出,按模式匹配行,并提醒你或把匹配的行交给智能体。 |
106
+ | [`session-bus`](./docs/extensions/session-bus.md) | `session`, `/sessions`(屏幕) | 在同一仓库的多个 Pi 会话之间协调:发现彼此、交换简短消息/事件、读取收件箱、编辑前声明路径;`/sessions` 是显示对等会话、未读邮件和路径声明的实时面板。本地、默认拉取式;收件箱监视需会话自行开启,空闲时会唤起本会话的一轮,从不创建智能体。 |
107
+ | [`board`](./docs/extensions/board.md) | `board`、`/board` | 每个仓库一块共享看板:一张卡片代表一个 feature,任何 session 都可以认领、移动、编辑、加注、完成它;同一个看板在浏览器里以 **Board** 和 **Team** 两个 tab 实时显示。看板以固定席位 `team-lead` 对外服务,因此第二个 session 打开的是同一块看板(只读),而不是另起一个。卡片可以带上优先级、声明自己在等待哪几张卡片,也可以在看板里交给某个队友。步骤留在 owner 的 plan 和 `todo` 里,卡片就是 feature、它的 owner,以及解释它的历史。在 `bytefly.json` 里设置 `board.port` 可以固定看板端口,收藏的地址在重启后依然有效。 |
108
+ | [`team`](./docs/extensions/team.md) | `team`、`/team` | 同一块看板上的 lead 轮次。`/team join <label>` 让一个 session 加入团队,lead 打开 `/board` 时则以 `team-lead` 自动加入;随后 `assign` 把一个 feature 交给运行中的 session,`offer` 交给谁有空谁接——广播而不写卡片,由第一个认领的人拿走——`reclaim` 把卡片收回 To do。结果会说明谁会因此被叫醒、谁会在下一轮才读到;`/team` 在终端里打印同一份轮次,不用开浏览器,也不启动任何进程。 |
109
+ | [`context`](./docs/extensions/context.md) | `/context` | 显示上下文窗口的去向 —— 系统提示、工具定义、按角色拆分的对话、注入的笔记 —— 并从报告中触发压缩,给出压缩前后的数字。 |
104
110
 
105
111
  ### 保护你的工作
106
112
 
107
113
  | 扩展 | 工具与命令 | 说明 |
108
114
  |---|---|---|
109
- | [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree` (screen), `/worktree enter|exit|prune`, `--worktree` | 在隔离的 `git worktree` 里、在独立分支上工作;内置的 read/write/edit/bash 工具会跟随,清理时也不会丢弃工作。 |
110
- | [`rewind`](./extensions/rewind/) | `/rewind`, `/review`, `↺ N` 状态标记 | 每次提示时在 `refs/pi/rewind` 下对仓库生成快照,可恢复代码、对话或两者,并在还原文件前审阅本轮改动。 |
111
- | [`memory`](./extensions/memory/) | `memory`, `/memory` | 跨会话的持久笔记,以可人工编辑的 Markdown 保存,注入每次运行,并通过 `/memory` 选择器管理。 |
115
+ | [`worktree`](./docs/extensions/worktree.md) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree` (screen), `/worktree enter\|exit\|prune`, `--worktree` | 在隔离的 `git worktree` 里、在独立分支上工作;内置的 read/write/edit/bash 工具会跟随,清理时也不会丢弃工作。 |
116
+ | [`rewind`](./docs/extensions/rewind.md) | `/rewind`, `/review`, `↺ N` 状态标记 | 在每次提示的首次改动前于 `refs/pi/rewind` 下对仓库生成快照,可恢复代码、对话或两者,并在还原文件前审阅本轮改动。 |
117
+ | [`memory`](./docs/extensions/memory.md) | `memory`, `/memory` | 跨会话的持久笔记,以可人工编辑的 Markdown 保存,注入每次运行,并通过 `/memory` 选择器管理。 |
112
118
 
113
119
  ### 连通外部世界
114
120
 
115
121
  | 扩展 | 工具与命令 | 说明 |
116
122
  |---|---|---|
117
- | [`web-access`](./extensions/web-access/) | `web_search`, `web_fetch` | 搜索网络(默认无密钥的 DuckDuckGo,可选 SearXNG 或 Brave),并把页面抓取为可读文本,支持分页、`find`、逐跳 SSRF 检查以及可选的 PDF 支持。 |
118
- | [`file-browse`](./extensions/file-browse/) | `/browse` | 启动一个以工作目录为根的本地回环、只读文件浏览器,带 Markdown 预览、模糊快速打开面板,以及为常开页面提供的实时状态。 |
119
- | [`file-read`](./extensions/file-read/) | `read_doc` | 在进程内从本地 PDF、DOCX、DOC、ODT、RTF 或 XLSX 提取文本,支持分页。 |
120
- | [`file-open`](./extensions/file-open/) | `/open`, `open_path` | 用操作系统原生应用打开或定位文件/目录。 |
121
- | [`wechat`](./extensions/wechat/) | `/wechat`, `send_wechat` | 通过微信 iLink 机器人 API 把微信聊天桥接到实时会话;入站文本、图片和文件会变成回合。 |
123
+ | [`web-access`](./docs/extensions/web-access.md) | `web_search`, `web_fetch` | 搜索网络(默认无密钥的 DuckDuckGo,可选 SearXNG 或 Brave),并把页面抓取为可读文本,支持分页、`find`、逐跳 SSRF 检查、把 JSON/CSV/XML 正文渲染为表格或树状结构,以及可选的 PDF 支持。 |
124
+ | [`file-browse`](./docs/extensions/file-browse.md) | `/browse` | 启动一个以工作目录为根的本地回环、只读文件浏览器,带 Markdown 预览、模糊快速打开面板、从选区复制 `path:12-30` 引用、为常开页面提供的实时状态,以及所列目录变化时的重新加载提示。 |
125
+ | [`file-read`](./docs/extensions/file-read.md) | `read_doc` | 在进程内从本地 PDF、DOCX、DOC、ODT、RTF 或 XLSX 提取文本,支持分页。 |
126
+ | [`file-open`](./docs/extensions/file-open.md) | `/open`, `open_path` | 用操作系统原生应用打开或定位文件/目录。 |
127
+ | [`wechat`](./docs/extensions/wechat.md) | `/wechat`, `send_wechat` | 通过微信 iLink 机器人 API 把微信聊天桥接到实时会话;入站文本、图片和文件会变成回合。 |
122
128
 
123
129
  ### 界面与维护
124
130
 
125
131
  | 扩展 | 工具与命令 | 说明 |
126
132
  |---|---|---|
127
- | [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor`、`settings`、`skills`、`update` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展与技能,并集中存放精选设置;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知,Pi 自己的启动更新块也会变成主题化 notice 与头部标记。`bytefly.json` 是每个扩展都会读取的配置文档。 |
133
+ | [`bytefly`](./docs/extensions/bytefly.md) | `/bytefly`(`doctor`、`settings`、`skills`、`update`、`upgrade` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展与技能,并集中存放精选设置;`/bytefly upgrade` 在确认后通过 Pi 自己的包管理器安装待更新版本;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知,Pi 自己的启动更新块也会变成主题化 notice 与头部标记。`bytefly.json` 是每个扩展都会读取的配置文档。 |
128
134
 
129
135
  ### 技能
130
136
 
@@ -132,10 +138,10 @@ changelog。新版本还会标在头部 —— 本包的与 Pi 自己的。不
132
138
 
133
139
  | 技能 | 说明 |
134
140
  |---|---|
135
- | [`init`](./skills/init/SKILL.md) | 基于仓库证据,通过内置的交互式访谈和计划审阅创建或更新项目的 `AGENTS.md`。 |
136
- | [`refactor`](./skills/refactor/SKILL.md) | 审计项目或路径中的重构机会:重复代码、过大的模块、耦合、结构漂移,以及测试薄弱且改动频繁的代码。返回带证据和验证命令的排序清单;发现阶段只读。 |
137
- | [`changelog`](./skills/changelog/SKILL.md) | 在变更的同一次提交中记录一条用户可见的条目,审计上一个 tag 以来缺失或薄弱的条目,并按项目自己的规则整理发布段落。 |
138
- | [`next`](./skills/next/SKILL.md) | 梳理接下来该做什么——未收尾的工作、已破坏或未兑现的承诺——可基于代码树或本次会话(`/skill:next session`),命令后的文字说明问什么、路径说明看哪里。只读,输出带证据和启动命令的简短排序清单。 |
141
+ | [`init`](./skills/init/SKILL.md) | 通过内置的交互式访谈和计划审阅,基于仓库证据创建或更新 Pi 实际读取的指令文件(`AGENTS.md`;存在覆盖它的 `AGENTS.override.md` 时则是该文件),并从仓库推导命令、生成路径与包范围。 |
142
+ | [`refactor`](./skills/refactor/SKILL.md) | 审计项目或路径中的重构机会:重复代码、过大的模块、耦合、结构漂移,以及测试薄弱且改动频繁的代码。随包的 `scripts/inventory.ts` 会量出体积、扇入、churn 和测试邻近度,让每条发现都带来源,排序清单附证据和验证命令;选定一个候选项后,它会把该重构带到不改行为地完成,而审计本身只读。 |
143
+ | [`project-docs`](./skills/project-docs/SKILL.md) | 让项目的四份文档如实描述代码:只读审计门面、路线图、贡献路径与 changelog,既对照代码树也互相对照;然后每个写入动作一个模式——在变更的同一次提交里记下 changelog 条目、按项目自己的规则整理发布段落、在已发布的路线图条目上删除并把其余重新编号、同步门面的目录、计数与示例。它先摸清各项目的类目名、范围拼写、条目形制与守卫,而不是套用模板;随包的 `scripts/state.ts` 会打印 changelog 的 tag、窗口与未发布类目。 |
144
+ | [`next`](./skills/next/SKILL.md) | 按优先级建议接下来的待办——未收尾的工作、已破坏或未兑现的承诺——会话已有工作时基于本次会话,仅当会话为空时才基于代码树;命令后的文字说明问什么、路径说明看哪里。只读,输出带证据和启动命令的简短编号清单。 |
139
145
 
140
146
  ### 主题
141
147
 
@@ -150,12 +156,16 @@ changelog。新版本还会标在头部 —— 本包的与 Pi 自己的。不
150
156
 
151
157
  <table>
152
158
  <tr>
153
- <td width="50%"><img src="assets/todo.png" alt="/todos 屏幕:Todos 标题线、3/7 完成摘要,以及带对勾、进行中和圆圈字形的列表" width="100%"></td>
154
- <td width="50%"><img src="assets/question.png" alt="ask_user_question 对话框:Auth 与 Scope 标签页、问题、四个带说明的编号选项,以及导航提示" width="100%"></td>
159
+ <td width="50%"><img src="assets/screens/todo.png" alt="/todos 屏幕:Todos 标题线、3/7 完成摘要,以及带对勾、进行中和圆圈字形的列表" width="100%"></td>
160
+ <td width="50%"><img src="assets/screens/question.png" alt="ask_user_question 对话框:Auth 与 Scope 标签页、问题、四个带说明的编号选项,以及导航提示" width="100%"></td>
155
161
  </tr>
156
162
  <tr>
157
- <td width="50%"><img src="assets/job.png" alt="/jobs 屏幕:摘要行、带状态字形和耗时的任务行,以及焦点任务的命令、工作目录和最后一行输出" width="100%"></td>
158
- <td width="50%"><img src="assets/rewind.png" alt="/rewind 屏幕:从新到旧的提示行、标记有代码快照的菱形,以及焦点提示的快照详情" width="100%"></td>
163
+ <td width="50%"><img src="assets/screens/job.png" alt="/jobs 屏幕:摘要行、带状态字形和耗时的任务行,以及焦点任务的命令、工作目录和最后一行输出" width="100%"></td>
164
+ <td width="50%"><img src="assets/screens/rewind.png" alt="/rewind 屏幕:从新到旧的提示行、标记有代码快照的菱形,以及一行标明焦点提示所持快照的详情" width="100%"></td>
165
+ </tr>
166
+ <tr>
167
+ <td width="50%"><img src="assets/screens/session.png" alt="/sessions 屏幕:计数摘要、带未读数和路径声明数的会话行、焦点会话的工作目录、声明和身份,以及 Tab 范围与监视提示" width="100%"></td>
168
+ <td width="50%"><img src="assets/screens/watch.png" alt="/watch 屏幕:摘要行和带实时匹配数的监视行,以及焦点监视的模式与来源" width="100%"></td>
159
169
  </tr>
160
170
  </table>
161
171
 
@@ -166,7 +176,7 @@ changelog。新版本还会标在头部 —— 本包的与 Pi 自己的。不
166
176
  (每个工具自身的渲染器或 bytefly 的通用回退)——用户铭牌与通知、Pi 内置工具,以及本包注册的每个工具。
167
177
  侧栏字形由 `chrome.rail` 设置。
168
178
 
169
- ![每个工具块的全页参考图:用户铭牌、通知、回合分隔线,Pi 的 read、write、edit、bash、grep、find、ls 渲染器,以及每个包内工具——todo、goal、memory、job、watch、subagent、web_search、web_fetch、read_doc、open_path、run_doctor、send_wechat、ask_user_question、plan 工具与 worktree 工具](assets/tool-renderings.png)
179
+ ![每个工具块的全页参考图:用户铭牌、通知、回合分隔线,Pi 的 read、write、edit、bash、grep、find、ls 渲染器,以及每个包内工具——todo、goal、memory、job、watch、subagent、web_search、web_fetch、read_doc、open_path、run_doctor、send_wechat、ask_user_question、session、board、team、plan 工具与 worktree 工具](assets/screens/tool-renderings.png)
170
180
 
171
181
  `bun run screenshot:tools` 重新生成它;`bun run screenshot:tool-pngs` 在
172
182
  [`assets/tools/`](./assets/tools) 下为每个工具输出一张图。
@@ -176,9 +186,9 @@ changelog。新版本还会标在头部 —— 本包的与 Pi 自己的。不
176
186
 
177
187
  ## 配置
178
188
 
179
- 大多数扩展无需配置。所有设置都在一个共享文档 `bytefly.json` 中,从
189
+ 大多数扩展无需配置。所有扩展设置都在一个共享文档 `bytefly.json` 中,从
180
190
  `<agent-dir>/bytefly.json` 读取,并与 `<cwd>/.pi/bytefly.json` 合并(项目优先),
181
- 位于一个以扩展名命名的顶层 section 下。每个扩展的 `README.md` 说明其键位的行为,
191
+ 位于一个以扩展名命名的顶层 section 下。每个扩展在 `docs/extensions/` 下的页面说明其键位的行为,
182
192
  [`docs/configuration.md`](./docs/configuration.md) 则给出解析规则、设置界面操作方式,
183
193
  以及每个 section 的键、类型、默认值和取值范围。
184
194
 
@@ -199,10 +209,12 @@ Pi 的 `--no-extensions`,或从你的设置中删除该包。
199
209
  |---|---|
200
210
  | [用户指南](./docs/user-guide/) | 分章手册:安装、每项功能、设置、故障排查与命令参考。 |
201
211
  | [配置](./docs/configuration.md) | 解析规则、设置界面,以及 `bytefly.json` 每个键的默认值与取值范围。 |
202
- | [架构](./docs/architecture.md) | 加载路径、运行时模型、状态、进程形态,以及新代码应放在哪里。 |
212
+ | [架构](./docs/architecture.md) | 目标形态:加载路径、扩展契约、一次回合、状态、分层、长生命周期,以及改动应放在哪里。 |
213
+ | [扩展文档](./docs/extensions/) | 每个扩展一页,以能力表开头:工具与命令面、集成契约,以及设计说明。 |
203
214
  | [开发](./docs/development.md) | 本地设置、检查、测试、跨平台注意事项与发布流程。 |
204
215
  | [安全](./docs/security.md) | 回环与远程界面的信任边界。 |
205
216
  | [路线图](./ROADMAP.md) | 包的下一步方向,按 README 的承诺分组,并列出每条事项的依据。 |
217
+ | [文档索引](./docs/README.md) | 全部文档的地图:各份指南,以及它们背后的深度契约,按读者归类。 |
206
218
 
207
219
  ## 参与贡献
208
220
 
@@ -0,0 +1,34 @@
1
+ # Extension docs
2
+
3
+ One page per extension, in the order the
4
+ [catalog](../../README.md#what-you-get) lists them. Every page opens with its **Capabilities** table — one row per thing
5
+ the extension can do, the tool, command, or key that delivers it, and what you
6
+ get — then the Quickstart, the surface, the behaviour, and the contributor
7
+ sections behind them.
8
+
9
+ | Extension | What it is | Page |
10
+ |---|---|---|
11
+ | `plan` | Read-only planning, saved to disk and reviewed in the TUI or a browser | [`plan.md`](./plan.md) |
12
+ | `check` | The project's test, lint, or typecheck command, run and parsed | [`check.md`](./check.md) |
13
+ | `subagent` | Delegation to a specialist agent in its own Pi process | [`subagent.md`](./subagent.md) |
14
+ | `todo` | A whole-list task tracker that follows the session branch | [`todo.md`](./todo.md) |
15
+ | `goal` | One persistent session objective, restated before each turn | [`goal.md`](./goal.md) |
16
+ | `question` | Structured questions with labelled options and a free-form answer | [`question.md`](./question.md) |
17
+ | `job` | Long-lived shell commands in the background, with logs and a wait | [`job.md`](./job.md) |
18
+ | `watch` | Tailing a file or command and matching new lines | [`watch.md`](./watch.md) |
19
+ | `session-bus` | Coordination between parallel Pi sessions on one repository | [`session-bus.md`](./session-bus.md) |
20
+ | `board` | One shared feature board per repository, read and written by every session, and one page a lead serves for the team to watch | [`board.md`](./board.md) |
21
+ | `team` | The lead's round: hand a card to a running session, take one back, or print it with `/team` | [`team.md`](./team.md) |
22
+ | `context` | Where the context window went, and compacting from the report | [`context.md`](./context.md) |
23
+ | `worktree` | An isolated `git worktree` per task, and the built-in tools following it | [`worktree.md`](./worktree.md) |
24
+ | `rewind` | Prompt-anchored snapshots, restoring code, conversation, or both | [`rewind.md`](./rewind.md) |
25
+ | `memory` | Durable cross-session notes as human-editable markdown | [`memory.md`](./memory.md) |
26
+ | `web-access` | Searching the web and fetching a page as readable text | [`web-access.md`](./web-access.md) |
27
+ | `file-browse` | A loopback, read-only browser for the working directory | [`file-browse.md`](./file-browse.md) |
28
+ | `file-read` | Text out of a PDF, DOCX, DOC, ODT, RTF, or XLSX, in process | [`file-read.md`](./file-read.md) |
29
+ | `file-open` | Opening or revealing a path in the OS-native application | [`file-open.md`](./file-open.md) |
30
+ | `wechat` | A WeChat bridge with one Pi conversation per peer | [`wechat.md`](./wechat.md) |
31
+ | `bytefly` | The header, footer, turn rule, control center, notices, and update check | [`bytefly.md`](./bytefly.md) |
32
+
33
+ The template every page follows is
34
+ [`docs/development.md#one-doc-per-extension`](../development.md#one-doc-per-extension).