Parent: #34 — graff-agent prerequisites in codegraff
Priority: P0 (substrate — blocks the entire learning loop)
Branch base: release/0.1.53
Why
Skills are read-only today. The Hermes-class self-improvement loop in graff-agent (graff-memd) depends on the agent being able to create, patch, and organize skill folders during a conversation. This issue adds that surface in codegraff so graff-memd can use it via the SDK.
Scope
Rust side
forge_domain::SkillRepository: add write, patch_file, delete, write_support_file, remove_support_file methods (mirrors Hermes' skill_manage actions: create, patch, edit, write_file, delete, remove_file).
- File layout per skill:
<skills_root>/<name>/SKILL.md + references/, templates/, scripts/ — match agentskills.io spec.
- Parse YAML frontmatter at the top of
SKILL.md for name + description + optional version + tools so progressive disclosure works (only metadata loads until activation).
SkillFetchService::list_skills() returns metadata only; full body fetched lazily via fetch_skill(name).
SDK side (sdk/typescript)
Expose under graff.skills:
create({ name, description, body, supportFiles? })
update(name, { description?, body? })
patch(name, { oldString, newString })
writeFile(name, { relPath, content })
delete(name)
removeFile(name, relPath)
list() returns { name, description }[]
get(name) returns full body
Acceptance
Parent: #34 — graff-agent prerequisites in codegraff
Priority: P0 (substrate — blocks the entire learning loop)
Branch base:
release/0.1.53Why
Skills are read-only today. The Hermes-class self-improvement loop in
graff-agent(graff-memd) depends on the agent being able to create, patch, and organize skill folders during a conversation. This issue adds that surface in codegraff so graff-memd can use it via the SDK.Scope
Rust side
forge_domain::SkillRepository: addwrite,patch_file,delete,write_support_file,remove_support_filemethods (mirrors Hermes'skill_manageactions:create,patch,edit,write_file,delete,remove_file).<skills_root>/<name>/SKILL.md+references/,templates/,scripts/— match agentskills.io spec.SKILL.mdforname+description+ optionalversion+toolsso progressive disclosure works (only metadata loads until activation).SkillFetchService::list_skills()returns metadata only; full body fetched lazily viafetch_skill(name).SDK side (
sdk/typescript)Expose under
graff.skills:create({ name, description, body, supportFiles? })update(name, { description?, body? })patch(name, { oldString, newString })writeFile(name, { relPath, content })delete(name)removeFile(name, relPath)list()returns{ name, description }[]get(name)returns full bodyAcceptance
cargo insta test --acceptpasses for new repository testsexamples/skill-mutation.tsround-trips a skill