You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design/agent-skills/agent-skills-spike.md
+36-28Lines changed: 36 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
**The problem**: Lightspeed Core has no mechanism for extending agent capabilities with specialized instructions or domain knowledge. Users cannot package reusable workflows, troubleshooting guides, or domain expertise into portable, discoverable units that the LLM can use on demand.
6
6
7
-
**The recommendation**: Implement the [Agent Skills open standard](https://agentskills.io) with a config-based discovery model. Skills are defined in `lightspeed-stack.yaml` pointing to directories containing `SKILL.md`files. The LLM sees a skill catalog (name + description) in the system prompt and can request full instructions on demand via a dedicated tool.
7
+
**The recommendation**: Implement the [Agent Skills open standard](https://agentskills.io) with filesystem-based discovery. Config specifies paths to skill directories; skill metadata (name, description) is read from `SKILL.md`frontmatter at startup. The LLM sees a skill catalog (name + description) in the system prompt and can request full instructions on demand via a dedicated tool.
8
8
9
9
**PoC validation**: Not applicable for this spike. The feature is well-defined by the agentskills.io specification and has been implemented by 30+ agent products including Claude Code, GitHub Copilot, Cursor, and OpenAI Codex.
10
10
@@ -20,20 +20,20 @@ These are the high-level decisions that determine scope, approach, and cost. Eac
20
20
| B | Product team-defined only (LS app teams like RHEL Lightspeed define their own skills) |
21
21
| C | Both built-in and product team-defined |
22
22
23
-
**Recommendation**: **B** (Product team-defined only). This allows LS app teams (e.g., RHEL Lightspeed, Ansible Lightspeed) to extend Lightspeed with domain-specific skills without requiring changes to Lightspeed Core. Product teams ship skills alongside the lightspeed-stack container by mounting skill directories via configmaps or container volumes, then pointing to them in `lightspeed-stack.yaml`. Built-in skills can be added to Lightspeed Core later if common patterns emerge.
23
+
**Recommendation**: **B** (Product team-defined only). This allows LS app teams (e.g., RHEL Lightspeed, Ansible Lightspeed) to extend Lightspeed with domain-specific skills without requiring changes to Lightspeed Core. Product teams ship skills alongside the lightspeed-stack container by mounting skill directories via ConfigMaps or container volumes, then specifying the paths in `lightspeed-stack.yaml`. Skill content is read from `SKILL.md` files at startup. Built-in skills can be added to Lightspeed Core later if common patterns emerge.
24
24
25
25
**Note**: End users of LS app products do NOT have the ability to add skills, similar to how they cannot add MCP servers. Skill configuration is controlled by product teams at deployment time.
26
26
27
27
### Decision 2: Discovery mechanism?
28
28
29
29
| Option | Description |
30
30
|--------|-------------|
31
-
| A | Filesystem-based (scan configured directories for`SKILL.md` files) |
32
-
| B | Config-based (define skills in `lightspeed-stack.yaml`) |
| B | Config-based (full skill definitions inlined in `lightspeed-stack.yaml`) |
33
33
| C | API-based (skills registered/managed via REST API) |
34
34
| D | Hybrid (built-in via config, product team-defined via filesystem or API) |
35
35
36
-
**Recommendation**: **B** (Config-based). Skills are defined in `lightspeed-stack.yaml` similar to `mcp_servers`. This provides explicit control over which skills are available, integrates with existing configuration patterns, and avoids filesystem scanning complexity.
36
+
**Recommendation**: **A** (Filesystem-based). Config specifies paths to skill directories (or a single directory containing multiple skills). Skill metadata (name, description) is read from `SKILL.md` frontmatter at startup. This keeps config lightweight, avoids bloating the config CR in k8s deployments, and allows skill content to be updated independently of config changes. Skills can be mounted via ConfigMaps, volumes, or any standard filesystem mechanism.
37
37
38
38
### Decision 3: Script execution support?
39
39
@@ -85,24 +85,30 @@ This keeps the base context small while giving the LLM access to specialized kno
85
85
86
86
### Decision 7: Configuration structure
87
87
88
-
Skills are configured as a list in `lightspeed-stack.yaml`, following the `mcp_servers` pattern:
88
+
Skills are configured by specifying paths to skill directories in `lightspeed-stack.yaml`. Two forms are supported:
89
89
90
+
**Option A: Directory of skills** (recommended for most deployments)
90
91
```yaml
91
92
skills:
92
-
- name: "code-review"
93
-
description: "Review code for best practices and security issues."
94
-
path: "/var/skills/code-review"
95
-
- name: "troubleshooting"
96
-
description: "Diagnose and fix OpenShift deployment issues."
- A directory containing a `SKILL.md` file (single skill)
107
+
- A directory containing subdirectories, each with a `SKILL.md` file (multiple skills)
108
+
109
+
Skill metadata (`name`, `description`) is read from the `SKILL.md` frontmatter at startup. This keeps config minimal and allows skill content to be managed independently.
104
110
105
-
**Recommendation**: Approved. This structure is consistent with existing config patterns and provides explicit control.
111
+
**Recommendation**: Approved. This structure keeps the config CR lightweight and decouples skill content from configuration.
106
112
107
113
## Proposed JIRAs
108
114
@@ -112,21 +118,23 @@ Each JIRA includes an agentic tool instruction pointing to the spec doc.
112
118
<!-- key: LCORE-???? -->
113
119
### LCORE-???? Add skill configuration model
114
120
115
-
**Description**: Add the `SkillConfiguration` Pydantic model and `skills` list to the main configuration. This enables defining skills in `lightspeed-stack.yaml`.
121
+
**Description**: Add the `SkillsConfiguration` Pydantic model to the main configuration. This enables specifying skill directory paths in `lightspeed-stack.yaml`.
116
122
117
123
**Scope**:
118
124
119
-
- Create `SkillConfiguration` class in `src/models/config.py`
120
-
- Add `skills: list[SkillConfiguration]` field to `Configuration` class
121
-
- Add validation: path exists, contains `SKILL.md`, name matches frontmatter
122
-
- Parse `SKILL.md` frontmatter on startup (extract name, description)
125
+
- Create `SkillsConfiguration` class in `src/models/config.py` with `paths: list[str]` field
126
+
- Add `skills: Optional[SkillsConfiguration]` field to `Configuration` class
- Store parsed skill metadata (name, description, path) for runtime use
123
130
124
131
**Acceptance criteria**:
125
132
126
-
- Skills can be defined in `lightspeed-stack.yaml` using the documented format
127
-
- Startup fails with clear error if skill path doesn't exist or lacks `SKILL.md`
128
-
- Startup fails if configured `name` doesn't match `SKILL.md` frontmatter `name`
129
-
- Unit tests cover validation scenarios
133
+
- Skill paths can be configured in `lightspeed-stack.yaml` using the documented format
134
+
- Startup scans configured paths and discovers all valid skills
135
+
- Startup fails with clear error if path doesn't exist or lacks valid `SKILL.md`
136
+
- Duplicate skill names across paths are detected and rejected
137
+
- Unit tests cover path scanning and validation scenarios
130
138
131
139
**Agentic tool instruction**:
132
140
@@ -334,7 +342,7 @@ OpenAI's SDK already includes `LocalSkill` and `Skill` types in its responses mo
334
342
335
343
**Path restrictions**: The `activate_skill` tool and reference file access are restricted to configured skill directories. The LLM cannot access arbitrary filesystem paths through skills.
336
344
337
-
**Trust model**: Skills are configured by LS app teams (e.g., RHEL Lightspeed) at deployment time, not by end users. Product teams mount skill directories into the container via configmaps or volumes and reference them in `lightspeed-stack.yaml`. This mirrors the MCP server trust model — end users cannot add arbitrary skills, only use the skills their product team has deployed.
345
+
**Trust model**: Skills are configured by LS app teams (e.g., RHEL Lightspeed) at deployment time, not by end users. Product teams mount skill directories into the container via ConfigMaps or volumes and specify the paths in `lightspeed-stack.yaml`. This mirrors the MCP server trust model — end users cannot add arbitrary skills, only use the skills their product team has deployed.
338
346
339
347
## Appendix A: Existing approaches research
340
348
@@ -349,7 +357,7 @@ OpenAI's SDK already includes `LocalSkill` and `Skill` types in its responses mo
349
357
350
358
### Alternative designs considered
351
359
352
-
**Filesystem scanning**: Rejected in favor of config-based discovery. Filesystem scanning adds complexity, requires directory configuration anyway, and could inadvertently load untrusted skills from cloned repositories.
360
+
**Full config-based definitions**: Rejected in favor of filesystem-based with config paths. Inlining full skill definitions (name, description, instructions) in `lightspeed-stack.yaml` would bloat the config CR in k8s deployments and couple skill content updates to config changes. Instead, config specifies paths and skill metadata is read from `SKILL.md` files.
353
361
354
362
**Inline content**: Rejected in favor of path-based. Inline content would clutter the YAML config for multi-skill deployments and doesn't support reference files.
0 commit comments