Repository navigation
Description
Summary
When DocsClaw is deployed in OpenShift/K8s, skills are mounted from OCI images or ConfigMaps into a predefined directory. The skill discovery mechanism (pkg/skills/Discover) already scans this directory and extracts metadata (name, description) from SKILL.md frontmatter and optional skill.yaml files. However, this discovered skill metadata is never injected into the AgentCard's skills array — the card is loaded from static agent-card.json and served as-is.
This means the A2A /.well-known/agent.json endpoint does not reflect the actual skills available to the agent at runtime, only what was hardcoded in the config.
Current behavior
internal/cmd/serve.goloadsagent-card.json→ staticskillsarraypkg/skills/Discover()scans the skills directory →[]SkillMeta{Name, Description, Dir}- Discovered skills are used to build a system prompt summary and register a
load_skilltool - No connection between steps 2-3 and the AgentCard served at the A2A endpoint
Expected behavior
After skill discovery, the AgentCard's skills field should be populated (or merged) with a2a.AgentSkill entries derived from the discovered skill metadata. The A2A endpoint should reflect the skills actually available at runtime.
Implementation notes
- Map
SkillMeta→a2a.AgentSkill(id, name, description; tags fromskill.yamlif present) - Merge with any skills already defined in
agent-card.json(static entries should not be overwritten) - The
DynamicCardHandleralready rewrites interface URLs per-request — skill injection can happen once at startup before the handler is created skill.yamlmay contain additional fields (tags, examples, inputModes) that map toAgentSkillfields — extract what's availableBuildAgentCard()ininternal/bridge/agentcard.goalready accepts aSkillsparam but is currently unused — consider whether to use it or inject directly
Key files
| File | Role |
|---|---|
internal/cmd/serve.go |
Loads card + discovers skills (wiring goes here) |
pkg/skills/loader.go |
Discover(), SkillMeta struct |
internal/bridge/agentcard.go |
BuildAgentCard(), card construction |
pkg/skills/card/ |
Optional skill.yaml parsing with richer metadata |
Activity