pi-scenes 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ active resources = common layer ∪ current scene
|
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
- **Common layer** — extensions + skills that stay loaded in *every* scenario (quota display, session carryover…)
|
|
21
|
-
- **Scene layers** — per-scenario bundles (
|
|
21
|
+
- **Scene layers** — per-scenario bundles (code-matt-pocock / code-poteto / office / writing…), loaded only while active
|
|
22
22
|
- **Project-scoped by default (v0.7)** — `/scene office` writes activation entries to `<cwd>/.pi/settings.json`, so a scene belongs to *this* directory only; opening a fresh directory starts clean. `--global` keeps the ≤0.6 all-projects behavior
|
|
23
23
|
- **Asset/activation split (v0.7)** — packages are installed once globally and shared across projects; git skill bundles are pinned as zero-exposure *anchors* (`{source, autoload:false, skills:[]}`) in user settings, while the project layer writes a *delta* (`{source, autoload:false, skills:[...]}`) that enables just the scene's whitelist — one clone, per-project curation, via pi's native delta mechanism
|
|
24
24
|
- **Full spatial isolation for scene packages (v0.11)** — *every* scene package (plain `npm:` specs included, not just filtered git bundles) now lands in the project layer as a universal delta (`{source, autoload:false, skills:["**"], extensions:["**"], ...}`) with a zero-exposure global anchor — one shared install, zero disk duplication, and a fresh directory loads **only the common layer**. Fixes the v0.7-v0.10 behavior where plain npm scene packages leaked into global settings and loaded in every project while the scene was active. Re-activating an existing scene migrates the leaked entries automatically (borrow semantics for user-configured globals is preserved)
|
|
@@ -26,8 +26,8 @@ active resources = common layer ∪ current scene
|
|
|
26
26
|
- Switching rewrites `packages`/`skills` in `settings.json`, then `ctx.reload()` hot-reloads — **no pi restart, session untouched**; prompt templates take a different path: injected via pi's `resources_discover` event with **zero settings writes**
|
|
27
27
|
- **Scene-scoped MCP servers (v0.13)** — each scene can declare its own `mcpServers`. Switching injects the scene's MCP tools into settings, and cleanly unmounts them when switching away. User-configured MCP servers are protected via borrow semantics
|
|
28
28
|
- **Claude Plugin interoperability (v0.13)** — `/scene import <dir>` imports any Claude Code / Cowork plugin (from `anthropics/knowledge-work-plugins` or local) as a native scene, transpiling `plugin.json`, `skills/`, `commands/` (to prompts), and `.mcp.json` automatically
|
|
29
|
-
- Every switch stamps a persistent **status-bar badge** (`◆
|
|
30
|
-
- **Zero-memory discoverability (v0.4.1)** — the command hint lists your scene names, and Tab completion shows every scene (icon + description + current marker) plus subcommands: type `/scene c` + Tab → `/scene
|
|
29
|
+
- Every switch stamps a persistent **status-bar badge** (`◆ code-matt-pocock`, or a per-scene `icon` like `🍖 code-matt-pocock`) so the bar always answers *"which scene am I in"* — restored at session start, cleared by `/scene off`
|
|
30
|
+
- **Zero-memory discoverability (v0.4.1)** — the command hint lists your scene names, and Tab completion shows every scene (icon + description + current marker) plus subcommands: type `/scene c` + Tab → `/scene code-matt-pocock`
|
|
31
31
|
- The data model reserves an `extends` chain (with cycle detection) for future **parent → child scene** hierarchies
|
|
32
32
|
|
|
33
33
|
## Install
|
|
@@ -49,9 +49,9 @@ Then `/reload` and `/scene` is live.
|
|
|
49
49
|
```
|
|
50
50
|
/scene # picker: all scenes, ● current project scene, ◐ global, ○ inactive
|
|
51
51
|
/scene <Tab> # tab-complete: lists all scenes (icon + description) and subcommands
|
|
52
|
-
/scene c<Tab> # completes to /scene
|
|
53
|
-
/scene
|
|
54
|
-
/scene
|
|
52
|
+
/scene c<Tab> # completes to /scene code-matt-pocock — no scene names to memorize
|
|
53
|
+
/scene code-matt-pocock # switch to the Matt-Pocock coding scene (project-scoped: <cwd>/.pi only)
|
|
54
|
+
/scene code-matt-pocock --global # switch as a global scene (every project, ≤0.6 behavior)
|
|
55
55
|
/scene office # switch to the office scene
|
|
56
56
|
/scene off # common layer only (clears both layers; anchors kept)
|
|
57
57
|
/scene status # show project/global scenes + effective packages/skills
|
|
@@ -64,12 +64,13 @@ Then `/reload` and `/scene` is live.
|
|
|
64
64
|
/scene suggest # scene-suggestion hints on/off (non-blocking; fires only when no scene is active)
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
First run of `/scene` offers to generate the template. It ships with **
|
|
67
|
+
First run of `/scene` offers to generate the template. It ships with **nine preset scenes + common** — a curated best-practice collection (all packages verified on npm/GitHub, 2026-09). v0.6.0 upgrades the presets with a full skill layer: git skill bundles install per scene with object-form resource filters, and research/writing ship vendored starter skills. Since v0.15 coding ships as two scenes: `code-matt-pocock` (Matt's grill→spec→tickets workflow) and `code-poteto` (pstack rigor engineering, poteto-mode + 22 principles):
|
|
68
68
|
|
|
69
69
|
| Scene | Extensions | Skills | Prompt templates (v0.8) |
|
|
70
70
|
|---|---|---|---|
|
|
71
71
|
| `common` | `npm:pi-scenes`, `npm:pi-carryover` | — (your own dir) | — |
|
|
72
|
-
| `
|
|
72
|
+
| `code-matt-pocock` | `npm:pi-lens`, `npm:pi-subagents` | `mattpocock/skills` → engineering/** (20 skills) + productivity/grilling | `/pre-commit` |
|
|
73
|
+
| `code-poteto` | `npm:pi-lens`, `npm:pi-subagents` | `backnotprop/pstack` → poteto-mode + principle-* (22) + tdd/how/why/architect/arena/swarm/interrogate/blast-radius/unslop/no-comments/correct/reflect/statechart/ts-best-practices/figure-it-out/show-me-your-work/technical-writing | — |
|
|
73
74
|
| `office` | `npm:pi-docparser` | `anthropics/skills` → docx, pptx, xlsx, pdf, internal-comms | `/doc-from-notes` |
|
|
74
75
|
| `pm` | `npm:pi-web-access`, `npm:pi-goal-x`, `npm:@juicesharp/rpiv-todo`, `npm:@juicesharp/rpiv-ask-user-question` | — | `/prd-skeleton` |
|
|
75
76
|
| `research` | `npm:pi-web-access`, `npm:pi-subagents` | 预置:arxiv-research, openalex-paper-search | `/deep-dive` |
|
|
@@ -97,11 +98,11 @@ Edit it to fit your setup (each scene also gets a skill dir scaffold at `~/.pi/a
|
|
|
97
98
|
"skills": ["~/.pi/agent/scenes/common/skills"]
|
|
98
99
|
},
|
|
99
100
|
"scenes": { // ── scene layers: stacked when active
|
|
100
|
-
"
|
|
101
|
-
"description": "coding",
|
|
102
|
-
"icon": "
|
|
101
|
+
"code-matt-pocock": {
|
|
102
|
+
"description": "coding (Matt Pocock workflow)",
|
|
103
|
+
"icon": "🍖",
|
|
103
104
|
"packages": ["npm:pi-carryover"],
|
|
104
|
-
"skills": ["~/.pi/agent/scenes/
|
|
105
|
+
"skills": ["~/.pi/agent/scenes/code-matt-pocock/skills"]
|
|
105
106
|
},
|
|
106
107
|
"office": {
|
|
107
108
|
"description": "office work",
|
|
@@ -114,7 +115,7 @@ Edit it to fit your setup (each scene also gets a skill dir scaffold at `~/.pi/a
|
|
|
114
115
|
}
|
|
115
116
|
```
|
|
116
117
|
|
|
117
|
-
Drop `SKILL.md` folders (or `.md` files) into a scene's skill directory; the whole directory toggles with the scene. `/scene init` scaffolds `~/.pi/agent/scenes/{common,
|
|
118
|
+
Drop `SKILL.md` folders (or `.md` files) into a scene's skill directory; the whole directory toggles with the scene. `/scene init` scaffolds `~/.pi/agent/scenes/{common,code-matt-pocock,code-poteto,office,pm,research,writing,data}/skills/`.
|
|
118
119
|
|
|
119
120
|
### Project vs global scopes (v0.7)
|
|
120
121
|
|
|
@@ -143,20 +144,20 @@ What actually lands on disk when you switch scenes:
|
|
|
143
144
|
|
|
144
145
|
Two consequences worth internalizing:
|
|
145
146
|
|
|
146
|
-
- **Loaded ≠ present.** Switching scenes swaps the *declarations*; disks keep whatever was copied before. After office→
|
|
147
|
+
- **Loaded ≠ present.** Switching scenes swaps the *declarations*; disks keep whatever was copied before. After office→code-matt-pocock, the office skill dir still sits in `<cwd>/.pi/scenes/office/` but has no settings entry pointing at it — never scanned, never loaded, zero prompt cost. It only means switching back is instant.
|
|
147
148
|
- **Copies are yours.** A vendored skill copied into the project can be edited or deleted freely; upgrading pi-scenes never touches it. Want your improvement everywhere? Edit the global source (`~/.pi/agent/scenes/<name>/skills/`) and let other projects copy it on their first switch.
|
|
148
149
|
|
|
149
150
|
### Known limitation: cross-scene npm extensions are a global singleton
|
|
150
151
|
|
|
151
|
-
Skill exposure (the main point of scenes) is fully project-scoped via deltas. npm *extensions*, however, register their activation entries in the global layer — one slot per package. Running two pi instances in different projects with different scenes (A on `
|
|
152
|
+
Skill exposure (the main point of scenes) is fully project-scoped via deltas. npm *extensions*, however, register their activation entries in the global layer — one slot per package. Running two pi instances in different projects with different scenes (A on `code-matt-pocock`, B on `office`): whichever switches last removes the other's npm entries from global settings on its next reload (skills stay fine; extensions like pi-lens/pi-docparser swap). Single-project workflows never hit this. If you need concurrent per-project extension sets, tell me — a future version can project-scope npm extensions at the cost of per-project `node_modules`.
|
|
152
153
|
|
|
153
154
|
### Status-bar scene badge
|
|
154
155
|
|
|
155
|
-
A successful switch sets a persistent footer badge (`◆
|
|
156
|
+
A successful switch sets a persistent footer badge (`◆ code-matt-pocock`), restored automatically at every session start and cleared by `/scene off`. The status bar should answer *"which scene am I in"* — not display tool internals.
|
|
156
157
|
|
|
157
|
-
The prefix is customizable per scene via the `icon` field — emoji works great (
|
|
158
|
+
The prefix is customizable per scene via the `icon` field — emoji works great (`🍖 code-matt-pocock` for the grill workflow, `🥔 code-poteto` for the potato). The scaffolded presets ship with `🍖 🥔 📄 🎯 🔍 📝 📊`, and the picker plus `/scene status` display the same icon; unset scenes fall back to `◆`.
|
|
158
159
|
|
|
159
|
-
Scenes often bundle tool-heavy extensions whose own footer output crowds the bar. If you use
|
|
160
|
+
Scenes often bundle tool-heavy extensions whose own footer output crowds the bar. If you use either coding preset (`code-matt-pocock` / `code-poteto`), pi-lens's diagnostics widget and `LSP Inactive` status can be silenced **without losing any AI-side value** (turn-end error injection, `lens_diagnostics`, symbol navigation) via `~/.pi-lens/config.json`:
|
|
160
161
|
|
|
161
162
|
```json
|
|
162
163
|
{ "ui": { "hideLspStatus": true }, "widget": { "visible": false } }
|
|
@@ -209,7 +210,7 @@ In short: **installed forever, loaded per scene**. One caveat: extensions you in
|
|
|
209
210
|
|
|
210
211
|
You don't always remember to switch scenes before diving in. pi-scenes can notice and hint — **non-blocking toast, once per session, never auto-switches**:
|
|
211
212
|
|
|
212
|
-
- **History line** (session start): if this project last used a scene (recorded on every project-scoped switch, 30-day window), a toast suggests restoring it:
|
|
213
|
+
- **History line** (session start): if this project last used a scene (recorded on every project-scoped switch, 30-day window), a toast suggests restoring it: `🍖 上次此项目用的是「code-matt-pocock」场景 → /scene code-matt-pocock`
|
|
213
214
|
- **Intent line** (first message): pure keyword heuristics (no LLM, zero cost). Each preset scene carries built-in strong (weight 2) / weak (weight 1) keyword lists; a scene can also declare `keywords` (weight 2). A hint fires only when the best scene scores ≥ 2 AND strictly beats the runner-up (ties stay silent); inputs starting with `/` are never matched
|
|
214
215
|
|
|
215
216
|
Guardrails: one hint per session max (both lines share the budget); silent while any scene is active; after 3 consecutive ignored hints the project cools down until you actually switch (which resets the counter). `/scene suggest on|off` is the master switch (default on). Everything is a `ctx.ui.notify` toast — your typing flow is never interrupted.
|
|
@@ -217,9 +218,9 @@ Guardrails: one hint per session max (both lines share the budget); silent while
|
|
|
217
218
|
## How it works
|
|
218
219
|
|
|
219
220
|
```
|
|
220
|
-
/scene
|
|
221
|
+
/scene code-matt-pocock
|
|
221
222
|
│
|
|
222
|
-
├─ read scenes.json → target set = common ∪
|
|
223
|
+
├─ read scenes.json → target set = common ∪ code-matt-pocock (extends chains resolved)
|
|
223
224
|
├─ missing packages → confirm → `pi install` each (global scope isn't auto-installed)
|
|
224
225
|
├─ rewrite settings.json (see "Injection & reclamation")
|
|
225
226
|
└─ await ctx.reload() → extensions/skills hot-reload, session uninterrupted
|
|
@@ -265,7 +266,7 @@ Fixed workflows (release checklists, review procedures, research protocols) belo
|
|
|
265
266
|
|
|
266
267
|
**How it's wired — zero settings pollution.** The extension listens to pi's `resources_discover` event: on every startup/reload pi asks which extra resource paths to load, and pi-scenes answers with the active scene's `promptPaths`. Switching away simply stops returning them — templates vanish with **no settings writes, no cleanup, no residue** (unlike packages/skills, which land in settings.json).
|
|
267
268
|
|
|
268
|
-
- Scaffold preseeds one workflow template per preset scene (`/pre-commit` for
|
|
269
|
+
- Scaffold preseeds one workflow template per preset scene (`/pre-commit` for code-matt-pocock, `/deep-dive` for research, `/fact-check` for writing, `/prd-skeleton` for pm, `/doc-from-notes` for office, `/data-audit` for data), vendored into `~/.pi/agent/scenes/<scene>/prompts/` (idempotent copy, yours to edit)
|
|
269
270
|
- Same-name resolution: your hand-written templates (`~/.pi/agent/prompts/`, project `.pi/prompts/`) and package templates **win over** scene templates — user intent beats presets
|
|
270
271
|
- Why templates at all: they pin down step-by-step procedures so the model can't take shortcuts; human remembers the command name, the template carries the checklist
|
|
271
272
|
|
|
@@ -278,8 +279,30 @@ cp ~/.pi/agent/settings.json.scenes-bak ~/.pi/agent/settings.json # restore if
|
|
|
278
279
|
|
|
279
280
|
Before uninstalling, `/scene off` and prune entries you don't want to keep from `packages`/`skills`. `scenes.json` / `scenes-state.json` / the `scenes/` tree are inert leftovers — safe to keep or delete.
|
|
280
281
|
|
|
282
|
+
## Acknowledgements
|
|
283
|
+
|
|
284
|
+
pi-scenes only curates and whitelists; the workflows below belong to their authors — thank you:
|
|
285
|
+
|
|
286
|
+
- **[Matt Pocock](https://github.com/mattpocock)** — [mattpocock/skills](https://github.com/mattpocock/skills) (MIT): the engineering workflow (grill→spec→tickets→implement→review→pr) + grilling at the heart of the `code-matt-pocock` scene. Also the source of the vendored `/pre-commit` template inspiration.
|
|
287
|
+
- **[Lauren Tan (poteto)](https://github.com/poteto)** — [pstack](https://github.com/cursor/plugins/tree/main/pstack) (MIT, distributed via the [backnotprop/pstack](https://github.com/backnotprop/pstack) standalone mirror): `poteto-mode` (22 playbooks) + 22 principles at the heart of the `code-poteto` scene.
|
|
288
|
+
- **[Anthropic](https://github.com/anthropics/skills)** — anthropics/skills (MIT): office document suite (docx/pptx/xlsx/pdf), internal-comms and doc-coauthoring for the `office` / `writing` scenes.
|
|
289
|
+
- **Vendored starter-skill authors** — [blader/humanizer](https://github.com/blader/humanizer), Hermes arXiv/OpenAlex ports and the other `assets/scene-skills/` starters (MIT; per-file attribution in each SKILL.md footer).
|
|
290
|
+
|
|
291
|
+
All upstream skills keep their own licenses and repositories; scene whitelists follow their upstreams automatically.
|
|
292
|
+
|
|
281
293
|
## Changelog
|
|
282
294
|
|
|
295
|
+
### v0.15.1 (2026-11-28)
|
|
296
|
+
|
|
297
|
+
- **Scene icons** — `code-matt-pocock` 🍖 (grill → barbecue pun) and `code-poteto` 🥔 (potato pun); upstream crown icon replaced with something more approachable
|
|
298
|
+
- **Acknowledgements section** added (Matt Pocock, Lauren Tan/poteto, Anthropic, vendored starter-skill authors)
|
|
299
|
+
|
|
300
|
+
### v0.15.0 (2026-11-28)
|
|
301
|
+
|
|
302
|
+
- **Coding ships as two scenes** — `coding` renamed to `code-matt-pocock` (Matt Pocock's grill→spec→tickets→implement→review→pr workflow, unchanged bundle), and a new **`code-poteto`** preset: pstack by Lauren Tan (poteto, React core team; MIT, via the `backnotprop/pstack` standalone mirror that officially supports pi). Whitelist groups skills by dependency: `poteto-mode` (22 playbooks: bug-fix/feature/refactoring/perf/shipping/overnight…) + all 22 `principle-*` (its hard dependencies) + the rigor core (tdd/how/why/architect/arena/swarm/interrogate/blast-radius/unslop/no-comments/correct/reflect/statechart/typescript-best-practices/figure-it-out/show-me-your-work/technical-writing). Excluded on purpose: setup-pstack (Cursor model picker), ketchup-video/make-bot-ui/bro (non-coding), automate-me & verification-skill authoring (meta; re-add per taste)
|
|
303
|
+
- Vendored prompt dir `assets/scene-prompts/coding` → `code-matt-pocock`; users upgrading keep their on-disk copies (manifest reports the old key as removed, new key re-seeded on next `/scene init` or `/scene update-assets`)
|
|
304
|
+
- Intent-suggestion tables follow the rename: `code-matt-pocock` keeps the former coding keyword table; `code-poteto` gets a differentiated table (playbook/poteto/pstack/swarm/hillclimb/autopilot…). Overlapping hits tie → no toast (conservative by design); declare your own `keywords` in scenes.json to steer
|
|
305
|
+
|
|
283
306
|
### v0.14.0 (2026-11-28)
|
|
284
307
|
|
|
285
308
|
- **Scene suggestions** — when no scene is active, pi-scenes hints (non-blocking toast, once per session, never auto-switches): a **history line** at session start suggests restoring the scene this project last used (30-day window), and an **intent line** matches your first message against per-scene keyword tables (pure heuristics, no LLM; fires only when the best scene scores ≥ 2 and strictly beats the runner-up). Guardrails: silent while a scene is active, 3 consecutive ignores cool the project down (reset on switch), `/scene suggest on|off` master switch. Scenes accept a new `keywords` field (weight 2) to extend/override the built-in tables
|
|
@@ -344,7 +367,7 @@ MIT
|
|
|
344
367
|
# 中文说明
|
|
345
368
|
|
|
346
369
|
> [pi](https://pi.dev) 场景切换器:**通用层 + 分场景层**的 extension / skill / prompt 模板打包切换。
|
|
347
|
-
> 写代码时 `/scene
|
|
370
|
+
> 写代码时 `/scene code-matt-pocock`(Matt 工程流)或 `/scene code-poteto`(pstack 严谨流),办公时 `/scene office`——一键换装,热重载生效;v0.8 起场景还携带流程模板(`/pre-commit`、`/deep-dive`…),步骤清单固化、AI 无法跳步。
|
|
348
371
|
|
|
349
372
|
## 这是什么
|
|
350
373
|
|
|
@@ -366,8 +389,8 @@ pi 的 `packages` / `skills` 是全局平铺的:所有已安装扩展、所有
|
|
|
366
389
|
- **场景级 MCP 动态调度(v0.13)**——每个场景可声明专属 `mcpServers`。切换时动态挂载对应工具,切走时精确卸载;用户预配的 MCP 走借用保护不篡改
|
|
367
390
|
- **Claude Plugin 原生协议互通(v0.13)**——`/scene import <dir>` 一键将 Claude Code / Cowork 插件(如 Anthropic 官方知识工作流插件或社区生态)转换为原生场景,自动转译 `plugin.json`、`skills/`、`commands/`(转为 prompt 模板)及 `.mcp.json`
|
|
368
391
|
- 切换 = 改写 `settings.json` 的 `packages`/`skills` → `ctx.reload()` 热重载,**无需重启 pi**;prompt 模板走另一条路:经 pi 的 `resources_discover` 事件动态注入,**零 settings 写入**
|
|
369
|
-
- 每次切换成功后状态栏常驻**场景徽标**(`◆
|
|
370
|
-
- **零记忆可发现性(v0.4.1)**——命令提示行直接拼入场景名清单;Tab 补全列出全部场景(icon + 描述 + 当前标记)与子命令:`/scene c` + Tab → `/scene
|
|
392
|
+
- 每次切换成功后状态栏常驻**场景徽标**(`◆ code-matt-pocock`,或每场景自定义 `icon` 如 `🍖 code-matt-pocock`),状态栏随时回答「我现在在哪个场景」——会话启动自动恢复,`/scene off` 清除
|
|
393
|
+
- **零记忆可发现性(v0.4.1)**——命令提示行直接拼入场景名清单;Tab 补全列出全部场景(icon + 描述 + 当前标记)与子命令:`/scene c` + Tab → `/scene code-matt-pocock`
|
|
371
394
|
- 数据模型预留 `extends` 继承链(带环检测),为将来「主场景 → 子场景」层级铺路
|
|
372
395
|
|
|
373
396
|
## 安装
|
|
@@ -389,9 +412,9 @@ pi install git:github.com/Feng-H/pi-scenes
|
|
|
389
412
|
```
|
|
390
413
|
/scene # 弹出选择器:● 当前项目场景,◐ 当前全局场景,○ 可切
|
|
391
414
|
/scene <Tab> # Tab 补全:列出全部场景(icon + 描述)与子命令
|
|
392
|
-
/scene c<Tab> # 补齐为 /scene
|
|
393
|
-
/scene
|
|
394
|
-
/scene
|
|
415
|
+
/scene c<Tab> # 补齐为 /scene code-matt-pocock —— 无需记忆任何场景名
|
|
416
|
+
/scene code-matt-pocock # 切到 code-matt-pocock 场景(项目级:只写入 <cwd>/.pi)
|
|
417
|
+
/scene code-matt-pocock --global # 切为全局场景(所有目录生效,≤0.6 语义)
|
|
395
418
|
/scene office # 切到办公场景
|
|
396
419
|
/scene off # 仅保留通用层(摘两层;资产锚点保留)
|
|
397
420
|
/scene status # 查看项目/全局两级场景 + 生效 packages/skills
|
|
@@ -404,12 +427,13 @@ pi install git:github.com/Feng-H/pi-scenes
|
|
|
404
427
|
/scene suggest # 场景意图提示开关(无场景激活时非阻塞建议切换)
|
|
405
428
|
```
|
|
406
429
|
|
|
407
|
-
首次运行 `/scene` 会询问是否生成模板,生成后编辑场景定义。模板内置
|
|
430
|
+
首次运行 `/scene` 会询问是否生成模板,生成后编辑场景定义。模板内置 **九个预设场景 + 通用层**(包均在 npm 核验存在,2026-09;v0.15 起编码拆为双场景 `code-matt-pocock` / `code-poteto`):
|
|
408
431
|
|
|
409
432
|
| 层 | 预设 packages | 理由 |
|
|
410
433
|
|---|---|---|
|
|
411
434
|
| `common` | `npm:pi-scenes`、`npm:pi-carryover` | 切换器自身 + 跨会话承接,恒需 |
|
|
412
|
-
| `
|
|
435
|
+
| `code-matt-pocock` | `npm:pi-lens`、`npm:pi-subagents`、`mattpocock/skills`(engineering/** + grilling) | LSP/lint 实时反馈、子代理委派、Matt Pocock 工程流(grill→spec→tickets→implement→review→pr) |
|
|
436
|
+
| `code-poteto` | `npm:pi-lens`、`npm:pi-subagents`、`backnotprop/pstack`(poteto-mode + principle-*×22 + tdd/how/why/architect/arena/swarm/interrogate/blast-radius/unslop/no-comments/correct/reflect/statechart/ts-best-practices/figure-it-out/show-me-your-work/technical-writing) | LSP/lint 实时反馈、子代理委派、pstack 严谨工程流(poteto-mode 22 playbook 路由:bug 修复/特性/重构/性能/过夜跑…+ 22 条 principle 原则) |
|
|
413
437
|
| `office` | `npm:pi-docparser` | PDF/Office 文档解析 |
|
|
414
438
|
| `pm` | `npm:pi-web-access`、`npm:pi-goal-x`、`npm:@juicesharp/rpiv-todo` | 竞品/市场调研、目标规划与完成度审计、需求/任务清单 overlay |
|
|
415
439
|
| `research` | `npm:pi-web-access`、`npm:pi-subagents` | 多源搜索/抓取/PDF/视频,并行多角度深挖 |
|
|
@@ -418,7 +442,7 @@ pi install git:github.com/Feng-H/pi-scenes
|
|
|
418
442
|
| `learning` | `npm:pi-web-access`、`npm:pi-subagents` | 学习材料获取、并行多视角学习;预置 skill:eli5(大白话解释) |
|
|
419
443
|
| `productivity` | `npm:pi-carryover` | 个人生产力:任务清单驱动工作流与重要上下文沉淀(基于 Anthropic 知识插件规范) |
|
|
420
444
|
|
|
421
|
-
v0.8 起每个预设场景还携带流程模板(
|
|
445
|
+
v0.8 起每个预设场景还携带流程模板(code-matt-pocock→`/pre-commit`、office→`/doc-from-notes`、pm→`/prd-skeleton`、research→`/deep-dive`、writing→`/fact-check`、data→`/data-audit`;v0.9 learning 场景→`/feynman` 费曼内化 + `/socratic` 苏格拉底检验 + `/flashcards` 闪卡复习,三件套),切换后直接可用;自己加模板只需往 `~/.pi/agent/scenes/<名>/prompts/` 丢 `.md` 文件。
|
|
422
446
|
|
|
423
447
|
每个场景同时生成 skill / prompts 目录骨架 `~/.pi/agent/scenes/<名>/{skills,prompts}/`,按需编辑:
|
|
424
448
|
|
|
@@ -431,11 +455,11 @@ v0.8 起每个预设场景还携带流程模板(coding→`/pre-commit`、offic
|
|
|
431
455
|
"skills": ["~/.pi/agent/scenes/common/skills"]
|
|
432
456
|
},
|
|
433
457
|
"scenes": { // ── 场景层:激活才叠加
|
|
434
|
-
"
|
|
458
|
+
"code-matt-pocock": {
|
|
435
459
|
"description": "写代码",
|
|
436
|
-
"icon": "
|
|
460
|
+
"icon": "🍖",
|
|
437
461
|
"packages": ["npm:pi-carryover"],
|
|
438
|
-
"skills": ["~/.pi/agent/scenes/
|
|
462
|
+
"skills": ["~/.pi/agent/scenes/code-matt-pocock/skills"]
|
|
439
463
|
},
|
|
440
464
|
"office": {
|
|
441
465
|
"description": "办公",
|
|
@@ -449,7 +473,7 @@ v0.8 起每个预设场景还携带流程模板(coding→`/pre-commit`、offic
|
|
|
449
473
|
```
|
|
450
474
|
|
|
451
475
|
场景 skill 目录里放 `SKILL.md` 文件夹(或 `.md` 文件)即可,切换场景时整目录启停。
|
|
452
|
-
`/scene init` 会创建 `~/.pi/agent/scenes/{common,
|
|
476
|
+
`/scene init` 会创建 `~/.pi/agent/scenes/{common,code-matt-pocock,code-poteto,office,pm,research,writing,data}/skills/` 骨架。
|
|
453
477
|
|
|
454
478
|
### 资源加载方式:大件共享、小件复制、全程无软链接
|
|
455
479
|
|
|
@@ -463,20 +487,20 @@ v0.8 起每个预设场景还携带流程模板(coding→`/pre-commit`、offic
|
|
|
463
487
|
|
|
464
488
|
两个值得记住的推论:
|
|
465
489
|
|
|
466
|
-
- **「存在」≠「加载」。** 切换换的是声明,磁盘留着切过的所有副本。office→
|
|
490
|
+
- **「存在」≠「加载」。** 切换换的是声明,磁盘留着切过的所有副本。office→code-matt-pocock 后,office 技能目录仍在 `<cwd>/.pi/scenes/office/`,但没有任何 settings 条目指向它——不被扫描、不被加载、零提示成本;意义仅是切回时秒级。
|
|
467
491
|
- **复制即所有。** 复制进项目的技能随意改删,升级 pi-scenes 永远不会碰它;想让改进全局生效,改全局源(`~/.pi/agent/scenes/<名>/skills/`),其他项目首切时自然复制到。
|
|
468
492
|
|
|
469
493
|
### 已知限制:跨场景 npm 扩展是全局单例
|
|
470
494
|
|
|
471
|
-
技能暴露(场景的核心差异)已通过 delta 完全项目级隔离;但 npm 扩展的激活条目在全局层——每包一个坑位。两个 pi 实例在不同项目跑不同场景(A 用
|
|
495
|
+
技能暴露(场景的核心差异)已通过 delta 完全项目级隔离;但 npm 扩展的激活条目在全局层——每包一个坑位。两个 pi 实例在不同项目跑不同场景(A 用 code-matt-pocock、B 用 office)时,后切换的一方会把先切换方的 npm 条目从全局 settings 摘掉(技能不受影响;pi-lens/pi-docparser 这类扩展会互换)。单项目工作流永远碰不到这个问题;确实需要多项目并行各自扩展集的,可以做到(代价:每项目重复装 node_modules),需要请在 issue 里说一声。
|
|
472
496
|
|
|
473
497
|
### 状态栏场景徽标
|
|
474
498
|
|
|
475
|
-
切换成功后状态栏常驻徽标(项目场景 `◆
|
|
499
|
+
切换成功后状态栏常驻徽标(项目场景 `◆ code-matt-pocock`,全局场景 `◇ code-matt-pocock ⌘`),每次会话启动自动恢复,`/scene off` 清除。状态栏应该回答「我现在在哪个场景、哪一层」——而不是展示工具的内部状态。
|
|
476
500
|
|
|
477
|
-
徽标前缀可按场景用 `icon` 字段定制——emoji
|
|
501
|
+
徽标前缀可按场景用 `icon` 字段定制——emoji 完全可用(`🍖 code-matt-pocock` 对应 grill 烤架工程流、`🥔 code-poteto` 对应土豆)。脚手架预设自带 `🍖 🥔 📄 🎯 🔍 📝 📊`,选择器与 `/scene status` 同步显示同一 icon;未配置的场景回退 `◆`。
|
|
478
502
|
|
|
479
|
-
场景常打包工具型扩展,它们自己的 footer
|
|
503
|
+
场景常打包工具型扩展,它们自己的 footer 输出会把状态栏拼得很吵。若使用任一编码预设(`code-matt-pocock` / `code-poteto`),pi-lens 的诊断 widget 与 `LSP Inactive` 状态可在**不损失任何 AI 侧价值**(turn-end 错误注入、`lens_diagnostics`、符号导航)的前提下静音,写入 `~/.pi-lens/config.json`:
|
|
480
504
|
|
|
481
505
|
```json
|
|
482
506
|
{ "ui": { "hideLspStatus": true }, "widget": { "visible": false } }
|
|
@@ -544,7 +568,7 @@ pi-scenes 绝不改第三方包的全局配置——徽标是它放到状态栏
|
|
|
544
568
|
|
|
545
569
|
不是每次都会记得先切场景再干活。pi-scenes 可以察觉并提示 —— **非阻塞 toast、每会话至多一次、永不自动切换**:
|
|
546
570
|
|
|
547
|
-
- **历史线**(会话启动):本项目上次用过某场景(每次项目级切换都会记录,30
|
|
571
|
+
- **历史线**(会话启动):本项目上次用过某场景(每次项目级切换都会记录,30 天有效),启动时提示恢复:`🍖 上次此项目用的是「code-matt-pocock」场景 → /scene code-matt-pocock`
|
|
548
572
|
- **意图线**(首条消息):纯关键词启发式(无 LLM、零成本)。每个预置场景有内置词表(强词权重 2 / 弱词权重 1),场景还可用 `keywords` 字段自定义(权重 2)。best 得分 ≥ 2 且严格高于次名才出手(平手静默);以 `/` 开头的命令输入永不参与匹配
|
|
549
573
|
|
|
550
574
|
防打扰:每会话最多提示一次(两线共享预算);任何场景已激活时静默;连续忽略 3 次项目级冷却,直到你真正切换场景才重置。`/scene suggest on|off` 总开关(缺省开)。全程只是 `ctx.ui.notify` 一行提示,不打断输入流。
|
|
@@ -552,9 +576,9 @@ pi-scenes 绝不改第三方包的全局配置——徽标是它放到状态栏
|
|
|
552
576
|
## 工作原理
|
|
553
577
|
|
|
554
578
|
```
|
|
555
|
-
/scene
|
|
579
|
+
/scene code-matt-pocock
|
|
556
580
|
│
|
|
557
|
-
├─ 读 scenes.json → 生效集合 = common ∪
|
|
581
|
+
├─ 读 scenes.json → 生效集合 = common ∪ code-matt-pocock(extends 链自动展开)
|
|
558
582
|
├─ 缺失的包 → confirm 后逐个 `pi install`(全局 scope pi 不自动装)
|
|
559
583
|
├─ 改写 settings.json(见「注入与回收」)
|
|
560
584
|
└─ await ctx.reload() → 扩展/skill 热重载,会话不中断
|
|
@@ -599,7 +623,7 @@ pi-scenes 绝不改第三方包的全局配置——徽标是它放到状态栏
|
|
|
599
623
|
|
|
600
624
|
**接线方式——零 settings 污染。** 与 packages/skills 落 settings.json 不同,模板走 pi 的 `resources_discover` 事件:每次启动/重载 pi 会询问各扩展需要加载哪些额外资源,pi-scenes 按当前激活场景返回模板路径。切走场景后不再返回——模板自动消失,**不写 settings、无需清理、零残留**。
|
|
601
625
|
|
|
602
|
-
- scaffold 为每个预设场景预置一个流程模板(
|
|
626
|
+
- scaffold 为每个预设场景预置一个流程模板(code-matt-pocock→`/pre-commit`、research→`/deep-dive`、writing→`/fact-check`、pm→`/prd-skeleton`、office→`/doc-from-notes`、data→`/data-audit`),vendored 复制到 `~/.pi/agent/scenes/<场景>/prompts/`(幂等,复制后归你所有,可改可删)
|
|
603
627
|
- 同名解析:你手写的模板(`~/.pi/agent/prompts/`、项目 `.pi/prompts/`)与包模板**优先于**场景模板——用户意图压过预设
|
|
604
628
|
- 为什么需要模板:把步骤清单固化成模板,模型就无法挑最快路径跳步;人只记命令名,清单由模板携带
|
|
605
629
|
|
|
@@ -612,8 +636,30 @@ cp ~/.pi/agent/settings.json.scenes-bak ~/.pi/agent/settings.json # 如需恢
|
|
|
612
636
|
|
|
613
637
|
managed 注入的条目在卸载前建议先 `/scene off` + 手工清理 `packages`/`skills` 里不想保留的条目;`scenes.json` / `scenes-state.json` / `scenes/` 目录留着不影响 pi 运行。
|
|
614
638
|
|
|
639
|
+
## 致谢
|
|
640
|
+
|
|
641
|
+
pi-scenes 只做策展与白名单裁剪;以下工作流属于各自的作者——感谢:
|
|
642
|
+
|
|
643
|
+
- **[Matt Pocock](https://github.com/mattpocock)** —— [mattpocock/skills](https://github.com/mattpocock/skills)(MIT):`code-matt-pocock` 场景核心的工程流(grill→spec→tickets→implement→review→pr)与 grilling 拷问流。
|
|
644
|
+
- **[Lauren Tan (poteto)](https://github.com/poteto)** —— [pstack](https://github.com/cursor/plugins/tree/main/pstack)(MIT,经 [backnotprop/pstack](https://github.com/backnotprop/pstack) standalone 镜像分发):`code-poteto` 场景核心的 poteto-mode(22 个 playbook)+ 22 条 principle 原则。
|
|
645
|
+
- **[Anthropic](https://github.com/anthropics/skills)** —— anthropics/skills(MIT):`office` / `writing` 场景引用的办公四件套(docx/pptx/xlsx/pdf)、internal-comms 与 doc-coauthoring。
|
|
646
|
+
- **预置技能原作者** —— [blader/humanizer](https://github.com/blader/humanizer)、Hermes arXiv/OpenAlex 移植等 `assets/scene-skills/` 内的预置技能(MIT;逐文件归属声明见各 SKILL.md 尾部)。
|
|
647
|
+
|
|
648
|
+
所有上游技能保留各自的许可与仓库;场景白名单自动跟随上游更新。
|
|
649
|
+
|
|
615
650
|
## 版本历史
|
|
616
651
|
|
|
652
|
+
### v0.15.1(2026-11-28)
|
|
653
|
+
|
|
654
|
+
- **场景 emoji 更换**——`code-matt-pocock` 🍖(grill 烤架→烤肉梗)、`code-poteto` 🥔(土豆梗;上游官方 crown 未采用,取亲民谐音)
|
|
655
|
+
- 新增**致谢章节**(Matt Pocock、Lauren Tan/poteto、Anthropic、预置技能原作者)
|
|
656
|
+
|
|
657
|
+
### v0.15.0(2026-11-28)
|
|
658
|
+
|
|
659
|
+
- **编码拆为双场景**——`coding` 更名 `code-matt-pocock`(Matt Pocock 工程流 grill→spec→tickets→implement→review→pr,组合不变),新增 **`code-poteto`** 预设:Lauren Tan(poteto,React 核心团队)的 pstack(MIT,经官方支持 pi 的 standalone 镜像 `backnotprop/pstack`)。白名单按技能依赖成组:`poteto-mode`(22 个 playbook:bug 修复/特性/重构/性能/发布/过夜跑…)+ 全部 22 条 `principle-*`(其硬依赖)+ 严谨核心(tdd/how/why/architect/arena/swarm/interrogate/blast-radius/unslop/no-comments/correct/reflect/statechart/typescript-best-practices/figure-it-out/show-me-your-work/technical-writing)。有意排除:setup-pstack(Cursor 模型选择器)、ketchup-video/make-bot-ui/bro(非编码)、automate-me 与验证技能创作类(meta;按需自加)
|
|
660
|
+
- vendored 模板目录 `assets/scene-prompts/coding` → `code-matt-pocock`;升级用户落盘副本保留(manifest 报告旧 key 为 removed,下次 `/scene init` 或 `/scene update-assets` 补种新 key)
|
|
661
|
+
- 意图提示词表随更名:`code-matt-pocock` 沿用原 coding 词表;`code-poteto` 用差异化词表(playbook/poteto/pstack/swarm/hillclimb/autopilot…)。重叠词双方命中 → 平手不出手(保守设计);可在 scenes.json 用 `keywords` 自定义偏好
|
|
662
|
+
|
|
617
663
|
### v0.14.0(2026-11-28)
|
|
618
664
|
|
|
619
665
|
- **场景意图提示**——无激活场景时非阻塞提示(toast、每会话至多一次、永不自动切换):**历史线**在会话启动时建议恢复本项目上次用的场景(30 天有效);**意图线**把首条消息与各场景关键词表匹配(纯启发式、无 LLM;best ≥ 2 且严格高于次名才出手,平手静默)。防打扰:场景已激活即静默、连续忽略 3 次项目冷却(切换重置)、`/scene suggest on|off` 总开关。场景新增 `keywords` 字段(权重 2)可扩展/覆盖内置词表
|
package/extensions/scenes.ts
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
*
|
|
38
38
|
* 命令:
|
|
39
39
|
* /scene 弹出选择器(当前场景高亮 ●)
|
|
40
|
-
* /scene <name> 切换到指定场景(默认项目级;参数 Tab 补全:/scene c<Tab> → /scene
|
|
40
|
+
* /scene <name> 切换到指定场景(默认项目级;参数 Tab 补全:/scene c<Tab> → /scene code-matt-pocock)
|
|
41
41
|
* /scene <name> --global 切换为全局场景(所有项目生效,≤0.6 语义)
|
|
42
42
|
* /scene off|none 关闭场景(摘两层,仅保留通用层;资产锚点保留)
|
|
43
43
|
* /scene status 显示当前激活与生效资源(项目/全局两级)
|
|
@@ -86,7 +86,7 @@ export type PackageEntry = string | { source: string; [k: string]: unknown };
|
|
|
86
86
|
|
|
87
87
|
export interface SceneDef {
|
|
88
88
|
description?: string;
|
|
89
|
-
/** 状态栏徽标与选择器里的场景前缀(建议 emoji,如
|
|
89
|
+
/** 状态栏徽标与选择器里的场景前缀(建议 emoji,如 🍖);缺省 ◆ */
|
|
90
90
|
icon?: string;
|
|
91
91
|
/** 前向兼容:继承父场景(主场景→子场景层级),资源按链 union 合并 */
|
|
92
92
|
extends?: string;
|
|
@@ -1246,6 +1246,8 @@ export function makeCore(baseDir: string, projectDir?: string) {
|
|
|
1246
1246
|
* 按场景裁剪 skills 子集(anthropics/skills 16M 全量)。曾用 openclaw/agent-skills
|
|
1247
1247
|
* (v0.8.1 移除:定位为 OpenClaw 项目专用工作流库而非通用编码技能;autoreview/handoff
|
|
1248
1248
|
* 的职责已由 pi-simplify / pi-subagents 覆盖)。
|
|
1249
|
+
* v0.15:编码拆为双场景 code-matt-pocock(Matt 工程流)/ code-poteto(pstack 严谨流),
|
|
1250
|
+
* 白名单按技能依赖成组裁剪(poteto-mode 需全部 principle-*)。
|
|
1249
1251
|
* 预置技能 vendored 自高质量开源技能(MIT,见各自 SKILL.md 尾部归属声明)。
|
|
1250
1252
|
*/
|
|
1251
1253
|
function scaffold(): string[] {
|
|
@@ -1261,9 +1263,9 @@ export function makeCore(baseDir: string, projectDir?: string) {
|
|
|
1261
1263
|
prompts: ["~/.pi/agent/scenes/common/prompts"],
|
|
1262
1264
|
},
|
|
1263
1265
|
scenes: {
|
|
1264
|
-
|
|
1266
|
+
"code-matt-pocock": {
|
|
1265
1267
|
description: "写代码:实时代码反馈(pi-lens)、子代理委派 + Matt Pocock 工程流(grill→spec→tickets→implement→review→pr)",
|
|
1266
|
-
icon: "
|
|
1268
|
+
icon: "🍖", // grill(烤架/拷问)→ 烤肉,呼应 Matt 招牌 grill 工程流
|
|
1267
1269
|
packages: [
|
|
1268
1270
|
"npm:pi-lens", // LSP/linter/格式化实时代码反馈
|
|
1269
1271
|
"npm:pi-subagents", // 单代理委派 + 脚本化多代理工作流(与 implement-spec 并行派工协同)
|
|
@@ -1272,8 +1274,48 @@ export function makeCore(baseDir: string, projectDir?: string) {
|
|
|
1272
1274
|
skills: ["skills/engineering/**", "skills/productivity/grilling/**"],
|
|
1273
1275
|
},
|
|
1274
1276
|
],
|
|
1275
|
-
skills: ["~/.pi/agent/scenes/
|
|
1276
|
-
prompts: ["~/.pi/agent/scenes/
|
|
1277
|
+
skills: ["~/.pi/agent/scenes/code-matt-pocock/skills"],
|
|
1278
|
+
prompts: ["~/.pi/agent/scenes/code-matt-pocock/prompts"], // scaffold 预置 pre-commit 提交前自检
|
|
1279
|
+
},
|
|
1280
|
+
"code-poteto": {
|
|
1281
|
+
description: "写代码:pstack 严谨工程流(poteto-mode 22 playbook 路由 + 22 条 principle 原则,Lauren Tan 出品)",
|
|
1282
|
+
icon: "🥔", // poteto = 土豆的梗(上游官方 icon 是 crown,取谐音更亲民)
|
|
1283
|
+
packages: [
|
|
1284
|
+
"npm:pi-lens", // LSP/linter/格式化实时代码反馈
|
|
1285
|
+
"npm:pi-subagents", // 子代理委派(swarm/arena/interrogate 的并行多代理落地)
|
|
1286
|
+
{
|
|
1287
|
+
source: "git:github.com/backnotprop/pstack", // Poteto (Lauren Tan) pstack(MIT;standalone 镜像与上游 cursor/plugins/pstack 同步,README 明确支持 pi)
|
|
1288
|
+
skills: [
|
|
1289
|
+
// 主入口 + 硬依赖:poteto-mode 的 22 playbook 引用全部 principle-*
|
|
1290
|
+
"skills/poteto-mode/**",
|
|
1291
|
+
"skills/principle-*/**",
|
|
1292
|
+
// 严谨编码核心(白名单按依赖成组;组合技能的依赖已齐:
|
|
1293
|
+
// architect→arena;blast-radius→arena/how/why/unslop;technical-writing→unslop)
|
|
1294
|
+
"skills/tdd/**",
|
|
1295
|
+
"skills/how/**",
|
|
1296
|
+
"skills/why/**",
|
|
1297
|
+
"skills/architect/**",
|
|
1298
|
+
"skills/arena/**",
|
|
1299
|
+
"skills/swarm/**",
|
|
1300
|
+
"skills/interrogate/**",
|
|
1301
|
+
"skills/blast-radius/**",
|
|
1302
|
+
"skills/unslop/**",
|
|
1303
|
+
"skills/no-comments/**",
|
|
1304
|
+
"skills/correct/**",
|
|
1305
|
+
"skills/reflect/**",
|
|
1306
|
+
"skills/statechart/**",
|
|
1307
|
+
"skills/typescript-best-practices/**",
|
|
1308
|
+
"skills/figure-it-out/**",
|
|
1309
|
+
"skills/show-me-your-work/**",
|
|
1310
|
+
"skills/technical-writing/**",
|
|
1311
|
+
],
|
|
1312
|
+
// 排除(按需自加):ketchup-video、make-bot-ui、bro(非编码)、
|
|
1313
|
+
// setup-pstack(Cursor 模型选择器,pi 不适用)、automate-me、
|
|
1314
|
+
// create-verification-skill 系列(meta 类,用时再加)
|
|
1315
|
+
},
|
|
1316
|
+
],
|
|
1317
|
+
skills: ["~/.pi/agent/scenes/code-poteto/skills"],
|
|
1318
|
+
prompts: ["~/.pi/agent/scenes/code-poteto/prompts"],
|
|
1277
1319
|
},
|
|
1278
1320
|
office: {
|
|
1279
1321
|
description: "办公:文档解析与生成、内部沟通",
|
|
@@ -1358,7 +1400,7 @@ export function makeCore(baseDir: string, projectDir?: string) {
|
|
|
1358
1400
|
writeJson(paths.scenesFile, template);
|
|
1359
1401
|
created.push(paths.scenesFile);
|
|
1360
1402
|
}
|
|
1361
|
-
for (const s of ["common", "
|
|
1403
|
+
for (const s of ["common", "code-matt-pocock", "code-poteto", "office", "pm", "research", "writing", "data", "learning", "productivity"]) {
|
|
1362
1404
|
for (const kind of ["skills", "prompts"] as const) {
|
|
1363
1405
|
const dir = path.join(paths.scenesRoot, s, kind);
|
|
1364
1406
|
if (!fs.existsSync(dir)) {
|
|
@@ -1610,10 +1652,16 @@ const PICKER_CANCEL = "—— 取消";
|
|
|
1610
1652
|
|
|
1611
1653
|
/** v0.14 预置场景内置意图词表:strong 权重 2 / weak 权重 1;用户 scenes.json 可用 keywords 覆盖/叠加 */
|
|
1612
1654
|
const PRESET_KEYWORDS: Record<string, { strong: string[]; weak: string[] }> = {
|
|
1613
|
-
|
|
1655
|
+
"code-matt-pocock": {
|
|
1614
1656
|
strong: ["重构", "refactor", "报错", "调试", "debug", "bug", "单元测试", "单测", "tdd", "类型错误", "编译错误", "报异常", "实现一个", "写个脚本"],
|
|
1615
1657
|
weak: ["代码", "函数", "测试", "提交", "commit", "部署", "npm", "git", "脚本", "性能", "代码审查", "依赖"],
|
|
1616
1658
|
},
|
|
1659
|
+
"code-poteto": {
|
|
1660
|
+
// 差异化词表:只用 pstack 特色工作流词,避免与 code-matt-pocock 重叠
|
|
1661
|
+
// (重叠词双方命中 → 平手不出手,意图提示保守正确;偏好可经 scenes.json keywords 覆盖)
|
|
1662
|
+
strong: ["playbook", "poteto", "pstack", "swarm", "hillclimb", "autopilot", "过夜跑", "多阶段计划", "正式验证", "statechart"],
|
|
1663
|
+
weak: ["严谨", "并行多代理", "验证链", "爆炸半径", "blast radius"],
|
|
1664
|
+
},
|
|
1617
1665
|
office: {
|
|
1618
1666
|
strong: ["ppt", "docx", "xlsx", "excel", "幻灯片", "会议纪要", "周报", "写邮件", "邮件草稿", "word文档", "pdf转"],
|
|
1619
1667
|
weak: ["文档", "表格", "通知", "公告", "简历", "排版"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-scenes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Scene switcher for pi: bundle extensions, skills, and prompt templates into a common layer + per-scene layers. /scene hot-switches with live reload (project-scoped, zero settings residue); scene-scoped workflow templates arrive via resources_discover with no config writes; scene definitions self-evolve from real usage (tool-call attribution + session-end LLM reflection).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
File without changes
|