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
**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 filesystem-based discovery. Config specifies paths to skill directories; skill metadata (name, description) is read from `SKILL.md` frontmatter at startup. The LLM discovers available skills via a `list_skills` tool and loads full instructions on demand via an `activate_skill` tool. The system prompt contains behavioral instructions for how to use these tools, not the skill catalog itself.
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 discovers available skills via a `list_skills` tool, loads full instructions on demand via an `activate_skill` tool, and retrieves reference files via a `load_skill_resource` tool. The system prompt contains behavioral instructions for how to use these tools, not the skill catalog itself.
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
@@ -64,7 +64,7 @@ Architecture-level and implementation-level decisions.
64
64
| Option | Description |
65
65
|--------|-------------|
66
66
| A | System prompt catalog (skill catalog embedded in system prompt, LLM decides) |
- Modify `get_system_prompt()` in `src/utils/prompts.py` to add behavioral instructions for skill discoveryand activation
187
+
- Modify `get_system_prompt()` in `src/utils/prompts.py` to add behavioral instructions for skill discovery, activation, and resource loading
185
188
186
189
**Acceptance criteria**:
187
190
188
191
- LLM can call `list_skills()` to get the catalog of available skills
189
192
- Tool returns name and description for each configured skill
190
193
- Tool returns empty list when no skills are configured
191
-
- System prompt includes behavioral instructions (how to use `list_skills`and `activate_skill`)
194
+
- System prompt includes behavioral instructions (how to use `list_skills`, `activate_skill`, and `load_skill_resource`)
192
195
- Unit tests verify tool registration, catalog formatting, and system prompt instructions
193
196
194
197
**Agentic tool instruction**:
@@ -232,28 +235,63 @@ src/utils/skills.py.
232
235
233
236
<!-- type: Task -->
234
237
<!-- key: LCORE-???? -->
235
-
### LCORE-???? Add skill reference file access
238
+
### LCORE-???? Implement load_skill_resource tool
236
239
237
-
**Description**: Enable the LLM to read files from the skill's `references/` subdirectory when skill instructions reference them.
240
+
**Description**: Register a `load_skill_resource` tool that the LLM can call to load files from a skill's `references/` subdirectory. This is the third skill tool, complementing `list_skills` and `activate_skill`.
238
241
239
242
**Scope**:
240
243
241
-
- Ensure existing file-read tool can access skill reference directories
244
+
- Add `load_skill_resource` tool registration in `prepare_tools()` in `src/utils/responses.py`
245
+
- Implement tool handler that reads files from skill `references/` directories
242
246
- Add path validation to restrict access to configured skill directories only
243
-
- Document the pattern for skill authors to reference files
247
+
- Return file content wrapped in structured tags
244
248
245
249
**Acceptance criteria**:
246
250
247
-
- LLM can read files from `<skill-path>/references/` using existing file-read capability
251
+
- LLM can call `load_skill_resource(skill_name="skill-name", path="references/guide.md")` to load a reference file
252
+
- Tool returns file content for valid paths within the skill's directory
253
+
- Tool returns error if skill name is invalid or path is outside skill directory
248
254
- Access is restricted to configured skill directories (no arbitrary filesystem access)
249
-
- Skill instructions can use relative paths like `references/troubleshooting-guide.md`
250
255
- Integration test verifies reference file access works end-to-end
251
256
252
257
**Agentic tool instruction**:
253
258
254
259
```text
255
-
Read the "Reference file access" section in docs/design/agent-skills/agent-skills.md.
Read the "load_skill_resource tool" section in docs/design/agent-skills/agent-skills.md.
261
+
Key files: src/utils/responses.py (prepare_tools function, line 204),
262
+
src/utils/skills.py.
263
+
```
264
+
265
+
<!-- type: Task -->
266
+
<!-- key: LCORE-???? -->
267
+
### LCORE-???? Wire skill tools into request flow
268
+
269
+
**Description**: Integrate the three skill tools (`list_skills`, `activate_skill`, `load_skill_resource`) into the request processing flow. This includes tool registration, invocation handling, and context management.
270
+
271
+
**Scope**:
272
+
273
+
- Register all three skill tools when skills are configured
274
+
- Add tool invocation routing in the response handler to dispatch skill tool calls
275
+
- Integrate skill behavioral instructions into `get_system_prompt()`
276
+
- Implement `SkillTracker` for per-conversation activation deduplication
277
+
- Ensure skill content (`<skill_content>`, `<skill_resource>` tags) is protected from context compaction
278
+
279
+
**Acceptance criteria**:
280
+
281
+
- All three skill tools are registered when skills are configured in `lightspeed-stack.yaml`
282
+
- Tool invocations are correctly routed to their handlers in `src/utils/skills.py`
283
+
- System prompt includes behavioral instructions when skills are configured
284
+
- Duplicate skill activations within a conversation return a note instead of re-injecting content
285
+
- Skill content in conversation context is preserved during compaction
286
+
- Integration test verifies end-to-end flow: list → activate → load_resource
287
+
288
+
**Agentic tool instruction**:
289
+
290
+
```text
291
+
Read the "Skill tools" and "Context management" sections in docs/design/agent-skills/agent-skills.md.
This keeps base context small while giving the LLM access to specialized knowledge on demand. The system prompt contains only behavioral instructions (~200 tokens) regardless of skill count.
356
448
@@ -385,7 +477,7 @@ OpenAI's SDK already includes `LocalSkill` and `Skill` types in its responses mo
**Note**: Google ADK's approach aligns with our recommendation. Their system prompt contains behavioral instructions (how to use the tools), not the skill catalog itself. The `list_skills` tool returns the catalog on demand.
480
+
**Note**: Google ADK's approach aligns with our recommendation. They use three tools: `list_skills` returns the catalog, `load_skill` loads instructions, and `load_skill_resource` loads reference files. Their system prompt contains behavioral instructions (how to use the tools), not the skill catalog itself.
0 commit comments