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:
+28
-2
@@ -161,6 +161,17 @@ default model with `opencode api get /api/model/default`.
|
||||
turn runs is stored in the server's durable queue (up to 8 per chat) and sent
|
||||
in order when the turn ends, also after a server restart.
|
||||
|
||||
**Skills in stages:** the stage service is shared and discovers skills per
|
||||
location, not per session, so a stage cannot be given private skills through
|
||||
OpenCode's skill discovery; its own `skill` tool stays denied by the stage's
|
||||
deny-all permission rules, which keeps ambient skills unusable. A stage's
|
||||
`skills` block is attached to each new session before its prompt as one
|
||||
`PUT /api/experimental/session/<id>/instructions/entries/pipelines-skill-<name>`
|
||||
entry carrying the skill's `SKILL.md` and the read-only directory of its
|
||||
bundled files (readable when the stage declares `read`/`glob`/`grep`). This needs
|
||||
the V2 service; a V1 backend fails the visit instead of dropping the skills, and
|
||||
a `SKILL.md` too large for one 64 KiB request fails it too.
|
||||
|
||||
## Pi
|
||||
|
||||
**Used for:** pipeline stages with `harness=pi`, and `new`/`edit`/`debug`
|
||||
@@ -171,8 +182,11 @@ refused unless that profile exists on the server.
|
||||
|
||||
**Launched as:** `pi --mode rpc --provider P --model M --session-dir <run dir>
|
||||
--no-approve --no-extensions --no-skills --no-context-files
|
||||
--no-prompt-templates --no-themes --extension policy.js`. The policy extension
|
||||
enforces the stage's tool and edit permissions. `reasoning_effort` maps to Pi's
|
||||
--no-prompt-templates --no-themes --extension policy.js`, plus one `--skill
|
||||
<dir>` per skill in the stage's `skills` block (Pi documents that explicit
|
||||
`--skill` paths still load under `--no-skills`; a skills stage must declare
|
||||
`read`, which the policy also allows inside the visit's skills directory). The
|
||||
policy extension enforces the stage's tool and edit permissions. `reasoning_effort` maps to Pi's
|
||||
thinking level and is verified before the task is sent.
|
||||
|
||||
**Install and sign in:**
|
||||
@@ -243,6 +257,18 @@ directory that chooses its own account keeps it).
|
||||
- **Isolation.** User, project and local Claude Code settings, hooks, MCP
|
||||
servers, plugins and slash commands are not loaded. A `CLAUDE.md` in the run
|
||||
directory is still read by the CLI.
|
||||
- **Skills.** With a `skills` block the visit's private copy is loaded as a
|
||||
session-only plugin (`--plugin-dir`, skills named `pipelines-stage:<name>`),
|
||||
`Skill` is added to `--tools` with one `Skill(pipelines-stage:<name>)` allow
|
||||
rule per skill, and `--disable-slash-commands` (which also disables plugin
|
||||
skills) is replaced by `--settings
|
||||
'{"disableBundledSkills":true,"enabledPlugins":{"cc-plugin-plugin-authoring@builtin":false}}'`.
|
||||
Claude Code 2.1.332 then lists only the configured skills plus the
|
||||
user-only `design` and `doctor` commands, which the model cannot invoke (a
|
||||
live haiku session saw only `pipelines-stage:<name>`; `dataviz` and
|
||||
`plugin-authoring` were "Unknown skill"). If a Skill call nevertheless loads
|
||||
any other skill, the visit fails; a refused call is harmless. Without a
|
||||
`skills` block the arguments are unchanged.
|
||||
- **Usage.** Cost and tokens come from the CLI's final result and count toward
|
||||
stage and run budgets; a result without usage fails a budgeted stage.
|
||||
- **Failures.** Diagnostics are fixed text. A billing, quota or rate-limit
|
||||
|
||||
Reference in New Issue
Block a user