pi-scenes 0.13.0 → 0.13.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 +10 -2
- package/extensions/scenes.ts +20 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ First run of `/scene` offers to generate the template. It ships with **eight pre
|
|
|
68
68
|
| Scene | Extensions | Skills | Prompt templates (v0.8) |
|
|
69
69
|
|---|---|---|---|
|
|
70
70
|
| `common` | `npm:pi-scenes`, `npm:pi-carryover` | — (your own dir) | — |
|
|
71
|
-
| `coding` | `npm:pi-lens`, `npm:pi-subagents
|
|
71
|
+
| `coding` | `npm:pi-lens`, `npm:pi-subagents` | `mattpocock/skills` → engineering/** (20 skills) + productivity/grilling | `/pre-commit` |
|
|
72
72
|
| `office` | `npm:pi-docparser` | `anthropics/skills` → docx, pptx, xlsx, pdf, internal-comms | `/doc-from-notes` |
|
|
73
73
|
| `pm` | `npm:pi-web-access`, `npm:pi-goal-x`, `npm:@juicesharp/rpiv-todo`, `npm:@juicesharp/rpiv-ask-user-question` | — | `/prd-skeleton` |
|
|
74
74
|
| `research` | `npm:pi-web-access`, `npm:pi-subagents` | 预置:arxiv-research, openalex-paper-search | `/deep-dive` |
|
|
@@ -268,6 +268,10 @@ Before uninstalling, `/scene off` and prune entries you don't want to keep from
|
|
|
268
268
|
|
|
269
269
|
## Changelog
|
|
270
270
|
|
|
271
|
+
### v0.13.1 (2026-11-28)
|
|
272
|
+
|
|
273
|
+
- **Coding preset refresh** — the `coding` scaffold preset now ships `npm:pi-lens` (LSP/ast-grep live code feedback) + `npm:pi-subagents` + `git:github.com/mattpocock/skills` via glob whitelists (`skills/engineering/**` + `skills/productivity/grilling/**`; 20 engineering skills follow upstream automatically). Removed `npm:pi-git-worktree`, `npm:pi-simplify` (duties covered by Matt's `code-review`), and the anthropics trio (frontend-design/webapp-testing/mcp-builder) — re-add per taste if you do web UI / MCP work
|
|
274
|
+
|
|
271
275
|
### v0.12.0 (2026-09-30)
|
|
272
276
|
|
|
273
277
|
* **学习场景 (learning) 重磅升级**:
|
|
@@ -388,7 +392,7 @@ pi install git:github.com/Feng-H/pi-scenes
|
|
|
388
392
|
| 层 | 预设 packages | 理由 |
|
|
389
393
|
|---|---|---|
|
|
390
394
|
| `common` | `npm:pi-scenes`、`npm:pi-carryover` | 切换器自身 + 跨会话承接,恒需 |
|
|
391
|
-
| `coding` | `npm:pi-lens`、`npm:pi-subagents`、`
|
|
395
|
+
| `coding` | `npm:pi-lens`、`npm:pi-subagents`、`mattpocock/skills`(engineering/** + grilling) | LSP/lint 实时反馈、子代理委派、Matt Pocock 工程流(grill→spec→tickets→implement→review→pr) |
|
|
392
396
|
| `office` | `npm:pi-docparser` | PDF/Office 文档解析 |
|
|
393
397
|
| `pm` | `npm:pi-web-access`、`npm:pi-goal-x`、`npm:@juicesharp/rpiv-todo` | 竞品/市场调研、目标规划与完成度审计、需求/任务清单 overlay |
|
|
394
398
|
| `research` | `npm:pi-web-access`、`npm:pi-subagents` | 多源搜索/抓取/PDF/视频,并行多角度深挖 |
|
|
@@ -582,6 +586,10 @@ managed 注入的条目在卸载前建议先 `/scene off` + 手工清理 `packag
|
|
|
582
586
|
|
|
583
587
|
## 版本历史
|
|
584
588
|
|
|
589
|
+
### v0.13.1(2026-11-28)
|
|
590
|
+
|
|
591
|
+
- **coding 预设焕新**——scaffold 预置改为 `npm:pi-lens`(LSP/ast-grep 实时代码反馈)+ `npm:pi-subagents` + `git:github.com/mattpocock/skills`(glob 白名单 `skills/engineering/**` + `skills/productivity/grilling/**`;20 个工程技能随上游自动跟进)。移除 `npm:pi-git-worktree`、`npm:pi-simplify`(职责被 Matt 的 `code-review` 覆盖)与 anthropics 三技能(frontend-design/webapp-testing/mcp-builder)——有 Web UI / MCP 需求可按需加回
|
|
592
|
+
|
|
585
593
|
### v0.11.1(2026-09-24)
|
|
586
594
|
|
|
587
595
|
- **锚点形态借用误判修复**——全局层既有的零暴露锚点条目(`{source, autoload:false, skills:[]}`,≤v0.10 写入但 anchors 账本未记录)不再被误判为用户手配的全局配置:重新激活时归一化补入账本并正常落项目 delta,而非按借用跳过
|
package/extensions/scenes.ts
CHANGED
|
@@ -241,7 +241,7 @@ function skillNameOf(file: string): string {
|
|
|
241
241
|
if (m) return m[1].trim();
|
|
242
242
|
const t = head.match(/^#\s+(.+)$/m);
|
|
243
243
|
if (t) return t[1].trim();
|
|
244
|
-
} catch {}
|
|
244
|
+
} catch { /* 头部读取失败:退回文件名 */ }
|
|
245
245
|
return path.basename(file).replace(/\.md$/i, "");
|
|
246
246
|
}
|
|
247
247
|
|
|
@@ -1247,16 +1247,14 @@ export function makeCore(baseDir: string, projectDir?: string) {
|
|
|
1247
1247
|
},
|
|
1248
1248
|
scenes: {
|
|
1249
1249
|
coding: {
|
|
1250
|
-
description: "
|
|
1250
|
+
description: "写代码:实时代码反馈(pi-lens)、子代理委派 + Matt Pocock 工程流(grill→spec→tickets→implement→review→pr)",
|
|
1251
1251
|
icon: "💻",
|
|
1252
1252
|
packages: [
|
|
1253
1253
|
"npm:pi-lens", // LSP/linter/格式化实时代码反馈
|
|
1254
|
-
"npm:pi-subagents", // 单代理委派 +
|
|
1255
|
-
"npm:pi-git-worktree", // git worktree 并行开发
|
|
1256
|
-
"npm:pi-simplify", // 近期变更代码审查(清晰度/一致性/可维护性)
|
|
1254
|
+
"npm:pi-subagents", // 单代理委派 + 脚本化多代理工作流(与 implement-spec 并行派工协同)
|
|
1257
1255
|
{
|
|
1258
|
-
source: "git:github.com/
|
|
1259
|
-
skills: ["skills/
|
|
1256
|
+
source: "git:github.com/mattpocock/skills", // Matt Pocock 工程技能集(MIT),glob 白名单随上游自动跟进
|
|
1257
|
+
skills: ["skills/engineering/**", "skills/productivity/grilling/**"],
|
|
1260
1258
|
},
|
|
1261
1259
|
],
|
|
1262
1260
|
skills: ["~/.pi/agent/scenes/coding/skills"],
|
|
@@ -1392,7 +1390,7 @@ export function makeCore(baseDir: string, projectDir?: string) {
|
|
|
1392
1390
|
try {
|
|
1393
1391
|
pluginMeta = JSON.parse(fs.readFileSync(mf, "utf8"));
|
|
1394
1392
|
break;
|
|
1395
|
-
} catch {}
|
|
1393
|
+
} catch { /* 清单解析失败:尝试下一个候选 */ }
|
|
1396
1394
|
}
|
|
1397
1395
|
}
|
|
1398
1396
|
|
|
@@ -1458,7 +1456,7 @@ export function makeCore(baseDir: string, projectDir?: string) {
|
|
|
1458
1456
|
mcpServers = mcpCfg.mcpServers;
|
|
1459
1457
|
importedMcpServers.push(...Object.keys(mcpServers));
|
|
1460
1458
|
}
|
|
1461
|
-
} catch {}
|
|
1459
|
+
} catch { /* .mcp.json 非法:忽略 */ }
|
|
1462
1460
|
}
|
|
1463
1461
|
|
|
1464
1462
|
// 6) 更新 scenes.json
|
|
@@ -1546,7 +1544,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1546
1544
|
} else {
|
|
1547
1545
|
ui.setStatus("pi-scene", undefined);
|
|
1548
1546
|
}
|
|
1549
|
-
} catch {}
|
|
1547
|
+
} catch { /* 徽标清理失败不阻断 */ }
|
|
1550
1548
|
}
|
|
1551
1549
|
|
|
1552
1550
|
/** 读两层 settings 的 packages(供缺失判定与冲突检测) */
|
|
@@ -1658,7 +1656,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1658
1656
|
try {
|
|
1659
1657
|
cfg = core.loadScenes();
|
|
1660
1658
|
active = core.effectiveActive();
|
|
1661
|
-
} catch {}
|
|
1659
|
+
} catch { /* 配置不可读:给出空补全 */ }
|
|
1662
1660
|
const items: Array<{ value: string; label: string; description?: string }> = [];
|
|
1663
1661
|
for (const [name, def] of Object.entries(cfg.scenes ?? {})) {
|
|
1664
1662
|
const icon = def?.icon?.trim() || "◆";
|
|
@@ -1686,7 +1684,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1686
1684
|
let names: string[] = [];
|
|
1687
1685
|
try {
|
|
1688
1686
|
names = Object.keys(core.loadScenes().scenes ?? {});
|
|
1689
|
-
} catch {}
|
|
1687
|
+
} catch { /* 配置不可读:降级为占位 */ }
|
|
1690
1688
|
return `切换场景(空格后 Tab 列出并补全):${names.join("/") || "<name>"}`;
|
|
1691
1689
|
}
|
|
1692
1690
|
|
|
@@ -1918,7 +1916,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1918
1916
|
function backupScenes(): void {
|
|
1919
1917
|
try {
|
|
1920
1918
|
if (fs.existsSync(core.paths.scenesFile)) fs.copyFileSync(core.paths.scenesFile, `${core.paths.scenesFile}.scenes-bak`);
|
|
1921
|
-
} catch {}
|
|
1919
|
+
} catch { /* 备份失败不阻断主流程 */ }
|
|
1922
1920
|
}
|
|
1923
1921
|
|
|
1924
1922
|
function shortLabel(k: string): string {
|
|
@@ -1926,7 +1924,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1926
1924
|
const v = JSON.parse(k);
|
|
1927
1925
|
if (typeof v === "string") return v;
|
|
1928
1926
|
if (v && typeof v === "object" && v.source) return v.source;
|
|
1929
|
-
} catch {}
|
|
1927
|
+
} catch { /* 条目不可读:退回路径展示 */ }
|
|
1930
1928
|
return k.split(path.sep).slice(-2).join("/");
|
|
1931
1929
|
}
|
|
1932
1930
|
|
|
@@ -1981,7 +1979,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1981
1979
|
let entries: any[] = [];
|
|
1982
1980
|
try {
|
|
1983
1981
|
entries = ctx.sessionManager?.getEntries?.() ?? [];
|
|
1984
|
-
} catch {}
|
|
1982
|
+
} catch { /* 条目不可读:视为空 */ }
|
|
1985
1983
|
const msgs = entries.filter((e) => e?.type === "message").slice(-40);
|
|
1986
1984
|
return msgs
|
|
1987
1985
|
.map((e) => {
|
|
@@ -2042,7 +2040,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
2042
2040
|
`自动进化已应用 ${proposals.length} 条提案(下次重载生效):\n${proposals.map((p) => (p.kind === "absorb" ? `+ ${specOf(p.entry)} → ${p.scene}` : `- ${p.label} (${p.scene})`)).join("\n")}`,
|
|
2043
2041
|
"info",
|
|
2044
2042
|
);
|
|
2045
|
-
} catch {}
|
|
2043
|
+
} catch { /* 通知失败不阻断 */ }
|
|
2046
2044
|
}
|
|
2047
2045
|
}
|
|
2048
2046
|
|
|
@@ -2058,7 +2056,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
2058
2056
|
"info",
|
|
2059
2057
|
);
|
|
2060
2058
|
}
|
|
2061
|
-
} catch {}
|
|
2059
|
+
} catch { /* 迁移提示失败不阻断 */ }
|
|
2062
2060
|
}
|
|
2063
2061
|
|
|
2064
2062
|
// v0.8:场景化 prompt 模板 —— resources_discover 事件动态注入。
|
|
@@ -2078,7 +2076,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
2078
2076
|
try {
|
|
2079
2077
|
const all = readAllSettingsPackages();
|
|
2080
2078
|
core.beginSession(ctx.sessionManager?.getSessionFile?.() ?? null, [...all.project, ...all.user]);
|
|
2081
|
-
} catch {}
|
|
2079
|
+
} catch { /* 会话记账失败不阻断切换 */ }
|
|
2082
2080
|
updateSceneBadge(ctx);
|
|
2083
2081
|
notifyLegacyMigration(ctx);
|
|
2084
2082
|
});
|
|
@@ -2086,7 +2084,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
2086
2084
|
pi.on("tool_call", async (event) => {
|
|
2087
2085
|
try {
|
|
2088
2086
|
core.recordToolUse((event as any).toolName, getToolMap().tools);
|
|
2089
|
-
} catch {}
|
|
2087
|
+
} catch { /* 用量记账失败不阻断 */ }
|
|
2090
2088
|
});
|
|
2091
2089
|
|
|
2092
2090
|
pi.on("session_shutdown", async (event, ctx) => {
|
|
@@ -2094,12 +2092,12 @@ export default function (pi: ExtensionAPI) {
|
|
|
2094
2092
|
if (reason === "reload") return;
|
|
2095
2093
|
try {
|
|
2096
2094
|
await runReflection(ctx);
|
|
2097
|
-
} catch {}
|
|
2095
|
+
} catch { /* 会话反思失败不阻断 */ }
|
|
2098
2096
|
try {
|
|
2099
2097
|
core.endSession(reason);
|
|
2100
|
-
} catch {}
|
|
2098
|
+
} catch { /* 会话收尾记账失败不阻断 */ }
|
|
2101
2099
|
try {
|
|
2102
2100
|
maybeAutoEvolve(ctx, reason);
|
|
2103
|
-
} catch {}
|
|
2101
|
+
} catch { /* 自动进化失败不阻断 */ }
|
|
2104
2102
|
});
|
|
2105
2103
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-scenes",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.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"
|