Skip to content

Commit 15cab96

Browse files
fabianvfclaude
andauthored
📖 ADR 0015 on skill packaging and delivery (#141)
Proposes dropping skillctl for an ordinary Containerfile, letting one image carry a bundle of skills, and assembling `/opt/skills` in an init container that validates what it assembled. Inline and git sources stop needing an image at all: inline becomes a ConfigMap, git is cloned at pod start, and the controller still builds nothing. skillctl was already producing a plain OCI image from a directory, and charging us a `skill.yaml` that duplicated the SKILL.md frontmatter. `skillctl install --target goose` isn't supported at v0.7.2 either, so the local dev story ADR 0001 promised was never reachable. Cloning git at pod start is the thing ADR 0001 rejected as "pallet as runtime sync engine", so this supersedes that explicitly rather than contradicting it quietly, and takes the loss: a git source needs the network at startup, isn't auditable by digest, and doesn't work air-gapped. That's bounded to `spec.source`, and the remedy is to build the repo into an image. Image and inline still need no network at pod start, so the air-gap requirement is scoped rather than overturned. Resolving git controller-side into a ConfigMap would remove the cost and stays open: `spec.source` means the same thing either way, so it can be adopted later without an API change. Also revises where ADR 0014 sources its rules list. `KONVEYOR_RULES` set from `spec.type` can't work for a bundle, since the controller never sees inside the image and so can't say which of the skills is a rule. #135 needs updating alongside this if the decision holds. One question is left open rather than settled: whether a SkillCard should be able to demote a skill whose frontmatter declares it a rule. Promotion is harmless, demotion turns a constraint into a suggestion, which is what ADR 0014 rejected an alternative over. I'd like a second opinion on that one before it hardens. The ADR lists the docs in CONTEXT.md and README.md that stop being true. They aren't touched here on purpose: this merges as `proposed` with no implementation, so those docs still describe the system as it actually is, and editing them now would make them wrong. A prototype of all of it exists and produced the measurements quoted in the ADR, including the four-case probe on minikube with CRI-O 1.35.0 and k8s v1.34.0. It's held back pending review of the decisions, so this PR is the ADR alone. Refs #44 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated the glossary to clarify AgentSkills.io `SKILL.md` formatting and distinguish on-demand skills from always-loaded rules. * Documented support for skills delivered through OCI images, Git sources, and inline configuration. * Added guidance for selecting skills from multi-skill packages using `subPath`. * Added an architectural decision record describing skill assembly, validation, naming, and delivery workflows. * Updated infrastructure and relationship documentation to reflect the revised skill packaging model. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 6a0cfcd commit 15cab96

2 files changed

Lines changed: 570 additions & 33 deletions

File tree

CONTEXT.md

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,36 @@
22

33
## Core Resources
44

5-
**SkillCard** — An individual agent capability or behavioral constraint,
6-
following the skillimage.io/v1alpha1 SkillCard format. A SkillCard with
7-
`type: skill` (default) is on-demand — only its name and description
8-
are loaded at startup; the full content activates when the agent
9-
invokes it. A SkillCard with `type: rule` is always-loaded — its full
10-
content is injected into every agent turn. A SkillCard CR supports
11-
three source types: an OCI
12-
image ref (pre-built artifact), a git source URL (controller clones,
13-
builds, and pushes the OCI artifact), or inline markdown content
14-
(controller builds and pushes). All three converge to a resolved OCI
15-
image ref in status. Examples: "maven-migration" (skill),
16-
"no-javax-imports" (rule).
5+
**SkillCard** — Exactly one agent capability or behavioral constraint.
6+
The skill itself is an AgentSkills.io directory: a `SKILL.md` carrying
7+
YAML frontmatter, optionally alongside supporting files. A SkillCard
8+
with `type: skill` (default) is on-demand — only its name and
9+
description are loaded at startup; the full content activates when the
10+
agent invokes it. A SkillCard with `type: rule` is always-loaded — its
11+
full content is injected into every agent turn. `type` lives on the CR,
12+
never in skill content, which keeps `SKILL.md` valid against the Agent
13+
Skills spec. A SkillCard names one of three sources: an OCI image ref,
14+
a git source URL, or inline markdown. Only the image source resolves to
15+
an artifact; inline is delivered as a ConfigMap and git is cloned at pod
16+
start, so nothing is built in-cluster. An image or repository holding
17+
several skills is addressed with `subPath`, since a SkillCard is always
18+
one skill. Examples: "maven-migration" (skill), "no-javax-imports"
19+
(rule). See ADR 0015.
1720

18-
**SkillCollection** — A group of skills, following the
19-
skillimage.io/v1alpha1 SkillCollection format. Each entry references a
20-
skill by OCI image ref, git source URL, or SkillCard CR name. The
21-
controller creates SkillCard CRs for git-sourced entries and reports
22-
readiness when all child SkillCards are resolved. An Agent references
23-
SkillCollections to gain access to sets of related capabilities.
24-
Examples: "konveyor-quarkus-skills" (a collection of 15 migration
25-
skills from a git repo), "enterprise-rules" (a curated set of rules
26-
as OCI images).
21+
**SkillCollection** — A named group of skills an Agent can reference in
22+
one line. Each entry references a skill by SkillCard CR name, or names a
23+
source directly. Grouping is separate from packaging: a collection may
24+
gather skills from several images, and one image may hold several skills
25+
that no collection groups. An Agent references SkillCollections to gain
26+
access to sets of related capabilities. Examples:
27+
"konveyor-quarkus-skills" (a collection of 15 migration skills),
28+
"enterprise-rules" (a curated set of rules).
29+
30+
_Not yet true_: the controller does not create SkillCard CRs for entries
31+
that name a source directly, though it likely should. Whether a
32+
collection becomes the primary type users write, resolving a multi-skill
33+
source into one generated SkillCard per skill, is an open question in
34+
ADR 0015.
2735

2836
**Gateway** — An LLM service endpoint serving exactly one provider/model
2937
combination. Each Gateway declares a provider type (e.g. `anthropic`,
@@ -111,13 +119,15 @@ results.
111119

112120
## Infrastructure
113121

114-
**skillimage** — Red Hat Emerging Technologies project
115-
(redhat-et/skillimage) providing OCI-based packaging and distribution
116-
for agent skills and rules. The `skillctl` CLI builds, validates,
117-
promotes, pushes, pulls, and installs skills. SkillCard and
118-
SkillCollection are skillimage's YAML metadata formats — our
119-
Kubernetes CRDs adopt the same shape. Supported install targets:
120-
claude, cursor, windsurf, opencode, openclaw.
122+
**Agent Skills** — The open skill format at agentskills.io, originally
123+
from Anthropic and adopted across agent clients. A skill is a directory
124+
holding a `SKILL.md` with YAML frontmatter (`name` and `description`
125+
required, plus `license`, `compatibility`, `metadata` and
126+
`allowed-tools`), optionally alongside `scripts/`, `references/` and
127+
`assets/`. The field set is closed, and the `skills-ref` reference
128+
library validates against it. Our skills are this format, and our
129+
SkillCard and SkillCollection CRDs keep their names from skillimage
130+
without adopting its packaging. See ADR 0015.
121131

122132
**Agent Sandbox** — Kubernetes SIG Apps project
123133
(kubernetes-sigs/agent-sandbox) providing CRDs for isolated, stateful
@@ -250,11 +260,11 @@ it belongs in the harness.
250260

251261
## Relationships
252262

253-
- A **SkillCard** resolves to an OCI artifact from one of three
254-
sources: OCI image ref, git source, or inline content.
255-
- A **SkillCollection** references skills by OCI image ref, git
256-
source, or **SkillCard** CR name. Git-sourced entries produce child
257-
**SkillCard** CRs.
263+
- A **SkillCard** is one skill, from one of three sources: OCI image
264+
ref, git source, or inline content. Only the image source resolves to
265+
an artifact; the others are delivered without one.
266+
- A **SkillCollection** groups skills, by **SkillCard** CR name or by
267+
naming a source directly.
258268
- An **Agent** references zero or more **SkillCards** and zero or more
259269
**SkillCollections**.
260270
- An **Agent** references one or more **Gateways** — declaring the

0 commit comments

Comments
 (0)