Stages: optional skills block loading pinned library skills per visit

A model stage may declare a skills block (name or name@N per line).
Drafts and publications are validated against the server skill library;
human/ntfy stages reject the block. Each run resolves unpinned names to the
latest version at admission and records name@N per stage (run
stage_skills, step skills); retry reuses the recorded versions. Every visit
gets a private read-only copy of exactly those bundles under the run's
artifact tree, and the harness loads only them: Claude via a session
plugin (--plugin-dir, Skill tool with per-skill allow rules, bundled skills
off, ambient loads fail the visit), Pi via --skill under --no-skills, and
OpenCode via per-session instruction entries (V2 only). The app shows the
block in the stage definition and the resolved versions on each visit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 19:17:16 +00:00
parent 509d4c624f
commit 85a7284fba
34 changed files with 1418 additions and 35 deletions
+27 -2
View File
@@ -1,8 +1,8 @@
# Definition format
A definition is Markdown made only of `# stage KEY` headings and fenced blocks;
no prose outside blocks. Blocks: `prompt`, `configs`, `tools`, `edges`, `checks`,
`limits` (`references/control.md`), `permissions` and `notify`
no prose outside blocks. Blocks: `prompt`, `configs`, `tools`, `skills`, `edges`,
`checks`, `limits` (`references/control.md`), `permissions` and `notify`
(`references/notifications.md`). There are no memory, links, input or output
blocks; stages communicate through `output.md` (`# handoff`) and `public/`.
Schedules are saved run configurations, never definition blocks
@@ -143,6 +143,31 @@ internally to `mcp__<server>__<tool>`; claude.ai connectors may look like
MCP tools; server configuration is not inspected during validation, so an
unknown name may fail at runtime.
## Skills
Optional `skills` (model stages only) turns on skills from the server skill
library (`pipelines skills list`), one per line: `name` loads the latest version
at run start, `name@N` pins version N. An empty or missing block loads none.
Drafts and publications are rejected for an unknown skill, a missing version,
`@0`/non-numeric versions, a skill listed twice (pinned or not) and a `skills`
block on a human or ntfy stage.
```skills
review-checklist
release-notes@3
```
When a run starts every entry is resolved to `name@N` and recorded on the run
(shown on each step), so a later import never changes a running stage; `retry`
(resume and restart) reuses the recorded versions for unpinned names. Each visit
gets a private read-only copy of exactly those bundles under the run's artifact
directory and only those skills: every other (user, project, bundled) skill
stays off. Harness notes: Claude loads them as a session plugin (`Skill` tool,
listed as `pipelines-stage:<name>`; a call that loads any other skill fails the visit);
Pi loads them with `--skill` and needs `read` in `tools` to open `SKILL.md`;
OpenCode attaches each `SKILL.md` as a session instruction entry (V2 service
only; bundled `references/` are readable with `read`).
## Checks
Every model stage that can modify the workspace (`edit` or `shell`, no `tools`
@@ -45,6 +45,20 @@ attempts and visits; missing required accounting fails closed. Session/RPC audit
lives in the execution user's cache under `pipelines/pi-sessions`; unconfirmed
cleanup blocks continuation and retry.
A `skills` block (`references/format.md`, Skills) is supported by all three
stage harnesses. Claude stages drop `--disable-slash-commands` only when skills
are configured and instead pass `--plugin-dir <visit skills dir>`, a
`--settings` layer with `disableBundledSkills` and the builtin
plugin-authoring plugin off, `Skill` in `--tools` and one
`Skill(pipelines-stage:<name>)` allow rule per skill; user/project skills stay
unloaded by `--setting-sources ""`. Pi keeps `--no-skills` (it disables every
discovered and configured skill) and adds `--skill <dir>` per skill. OpenCode
stages share one service whose skill discovery is not per session, and its own
skill tool stays denied by the stage's deny-all permissions; the configured
skills are attached as per-session instruction entries instead, which needs the
OpenCode V2 service (a V1 backend fails the visit) and a SKILL.md small enough
for one 64 KiB request.
Claude stages may additionally allow named MCP servers/tools in the `tools`
block. These are Claude-only, exact allowlist entries; other MCP tools remain
denied in unattended `dontAsk` sessions. Use `mcp:<server>` or