Repository navigation
Closed
Description
当前范围(2026-08-31 修订)
根据 Discussion #324 的已确认决定,本 Issue 改为复用 Pi 原生 Skill 调用与生命周期,不增加 OpenPI 的行内加载和正文恢复层。对应 PR #322;规范记录为 Decision 0002。
这是维护者主动调整需求,不是原贡献者没有完成旧要求。旧需求保留在文末作为历史,不再作为当前验收依据。
当前合同
- 模型自主选择 Skill:Pi 提供目录,正文通过原生
read按需读取。 - 用户显式调用:使用原生
/skill:name;补全、正文展开及 steering/follow-up 继续由 Pi 负责。 - 正文通过普通用户消息或工具结果进入正常 Session 历史,压缩与恢复完全交给 Pi。
- OpenPI 不提供专门的
$skill语法、独立正文缓存、provider-only 隐藏投影、压缩后补回正文或保活重读入口。 - 接受原生限制:压缩后不保证全文保留,也不保证模型自动重读;原生输出与上下文容量限制仍然适用。
当前验收
- PR 候选撤掉行内解析、补全适配、正文快照、上下文注入及压缩后重新关联;未新建替代运行时模块。
- README 和 Decision 说明原生用法、持久化差异与限制。
- 测试加载整个 OpenPI 包,证明
$skill不再触发程序注入,Pi 目录和原生读取仍可用。 - 测试证明原生斜杠调用、explicit-only Skill、直接及 streaming steering/follow-up、正常历史保存可用。
- 测试覆盖未知调用、文件读取失败、真实 Pi 压缩不额外补回正文、后续显式调用读取更新后的文件。
- 本地完整检查与测试通过;不是模型遵循能力或新终端 UI 验收。
- 当前 PR head
89f6c88fab44e489be38d276d76c7f9cd63c655f的必需 CI 检查通过:Node 22.19.0 / Node 24 / Windows。 - 取得非最后推送者的有效 approve,满足仓库合并门槛。
以上勾选表示候选代码/本地验证,不代表已经合并或发布。CI 状态随 #322 当前提交核对。Parent #282、#317 与 PR #321 没有因此自动关闭。
历史需求:行内 $skill+隐藏正文(已被上述原生方案替代)
Parent
What to build
Make $skill-name a working Inline Skill Reference for every normal Pi Session input path.
When a user submits a known reference, keep the raw user-visible message unchanged and add the referenced Skill content as hidden model-visible context. Resolve references only from the Skills that Pi supplies for that model turn. Pi remains responsible for Skill discovery, trust, collisions, diagnostics, and reload.
Acceptance criteria
- A known
$skill-namereference in a submitted message adds the corresponding frontmatter-stripped Skill content to model-visible context. - The raw user-visible message remains unchanged.
- Expansion works at the shared Session boundary used by TUI, RPC, print mode, and other normal input paths.
-
$begins a reference only at the start of input or after horizontal whitespace. - Normal punctuation can follow a known Skill name without becoming part of the reference.
- Text such as
abc$skill-nameremains ordinary text. - An escaped
\$skill-nameremains unchanged and is not expanded. - An unknown
$skill-nameremains unchanged and adds no Skill content. - Each distinct referenced Skill is loaded once, in first-reference order.
- References resolve only against Pi's Skills for the current model turn; OpenPI does not scan directories or maintain a Skill registry or cache.
- A Skill read failure is surfaced through Pi's extension error path and is not reported as successfully loaded.
- Tests separately prove raw user-visible text and hidden model-visible Skill content.
- The repository's complete check and test commands pass from the current main branch.
Blocked by
- None — can start immediately.
Metadata
Metadata
Assignees
Labels
No labels
Activity
sowen1023 commentedon Aug 31, 2026
I would like to work on this issue. I will implement the shared Session-level
$skill-nameexpansion at Pi’sbefore_agent_startseam, resolve only against the Skills supplied by Pi for the current turn, preserve the raw user-visible prompt, inject deduplicated hidden Skill content in first-reference order, surface read failures through the extension error path, and add focused regressions for lexical boundaries, ordering, unknown/escaped references, and projection separation. I will keep Pi as the sole Skill registry and run the full repository check and test suites.bkyssn commentedon Aug 31, 2026
感谢认领。这个子 Issue 的实现已经由 #321 覆盖,相关代码、测试和 CI 均已完成。为避免重复开发,请暂缓继续实现;#321 合并后本 Issue 会自动关闭。
[-]feat: expand inline Skill References for Session inputs[/-][+]test: preserve native Pi Skill invocation and lifecycle[/+]tt-a1i commentedon Sep 7, 2026
按本 Issue 2026-08-31 修订后的原生 Pi 范围关闭:#322 已合并到 main,README、Decision 0002 与原生 Skill 生命周期测试已落地。旧行内加载/隐藏正文需求已由维护者主动调整,不再作为当前验收条件;这不是原贡献者未完成旧要求。