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
+6
View File
@@ -265,6 +265,9 @@ type RunStep struct {
// for non-model stages and historical steps.
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
// Skills are the skill library versions (name@N) this model stage loads,
// resolved once when the run started; empty when it configures none.
Skills []string `json:"skills,omitempty"`
// ArtifactsSkipped and ArtifactsTruncated count files excluded from the
// bounded per-step scan (over the file/size cap) and by the total budget.
ArtifactsSkipped int `json:"artifacts_skipped,omitempty"`
@@ -512,6 +515,9 @@ type RunDetail struct {
Input map[string]any `json:"input"`
Output map[string]any `json:"output"`
Steps []RunStep `json:"steps"`
// StageSkills maps a model stage key to the skills (name@N) its skills
// block resolved to when the run started. A retry reuses these versions.
StageSkills map[string][]string `json:"stage_skills,omitempty"`
// Warnings are run-level, read-time notes an operator should see before
// trusting the evidence, e.g. that a visit's file-change capture was partial.
// Derived from Steps by RunWarnings; absent when there is nothing to flag.