redhat-et / redhat-et/docsclaw

refactor: use skillimage packages for skill.yaml parsing and discovery

Open
#40 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2
Forks
1
Avg merge
6h 9m
Merged PRs (30d)
1

Description

Summary

Replace docsclaw's local skill-related packages with imports from
skillimage to avoid
duplication and keep the two projects aligned.

What to replace

docsclaw package skillimage replacement Notes
pkg/skills/card/ skillimage/pkg/skillcard SkillCard parsing, validation, serialization
pkg/skills.ParseSkillYAML() skillimage/pkg/skillcard.Parse() Loose skill.yaml parse in a2a.go
pkg/skills.SkillYAML struct skillimage/pkg/skillcard.SkillCard Metadata struct

What to keep in docsclaw

  • pkg/skills/loader.goDiscover(), LoadContent(),
    BuildSummary() (runtime skill loading, agent-specific)
  • pkg/skills/a2a.goToAgentSkills(), MergeSkills()
    (AgentCard population, A2A-specific)

These functions would call into skillimage types instead of local
ones.

Skillimage packages available

Package Purpose
pkg/skillcard Parse, validate, serialize skill.yaml (any apiVersion)
pkg/source Discover skills from directories or git repos
pkg/installed Scan agent directories for installed skills
pkg/collection Parse SkillCollection YAML, generate K8s manifests
pkg/lifecycle Skill status transitions (draft → testing → published)

Steps

  1. Add github.com/redhat-et/skillimage as a dependency
  2. Replace pkg/skills/card/ types with skillcard.SkillCard
  3. Replace ParseSkillYAML() with skillcard.Parse()
  4. Update ToAgentSkills() to map skillcard.SkillCarda2a.AgentSkill
  5. Remove pkg/skills/card/ package
  6. Verify skill list and Discover() still work

Context

Both projects are maintained by the same team. The skillimage
project owns the skill.yaml schema (currently
skillimage.io/v1alpha1) and should be the single source of truth
for parsing and validation. Docsclaw currently has its own
docsclaw.io/v1alpha1 schema in pkg/skills/card/ plus a loose
SkillYAML struct — both should be replaced by the skillimage
types.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading pkg/skills/card/, pkg/skills/loader.go, and pkg/skills/a2a.go, then review the corresponding skillimage/pkg/skillcard APIs. Add skillimage as a dependency and trace the existing parsing, discovery, and AgentCard mapping flows. Done means the local card package and loose parser are removed, skill list and Discover() still work, and ToAgentSkills() uses skillimage.SkillCard.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.