refactor: replace hardcoded workflow→skill maps with catalog-driven lookup

Skills now declare their workflow in metadata.archie.workflow.
Catalog() scans frontmatter only (lazy, Tier 1). SkillForWorkflow()
derives the skill directory from the catalog — no hardcoded maps.

Removed workflowToSkill map (agent.go) and workflowToSkillDir switch
(worker.go). Both daemon and agent use the same catalog-based lookup.

Skills renamed to archie-wf-* convention. SKILL.md files updated with
workflow metadata field.

Progressive disclosure Tier 1: Catalog() returns name+description
+workflow. Tier 2: LoadBody() loads full body on activation.
This commit is contained in:
sam committed 2026-07-22 03:44:42 +10:00
1 parent d3c843e8f5
commit 2182cc00a5
11 files changed
+312 -38

No files matched your search

+5 -2
View File
@@ -36,14 +36,17 @@ func TestHandleMessageLoadsSkillsFromWorktree(t *testing.T) {
// the Mission string. HandleMessage never touches .agents/skills/.
dir := t.TempDir()
skillsDir := filepath.Join(dir, ".agents", "skills", "tdd-bugfix")
skillsDir := filepath.Join(dir, ".agents", "skills", "archie-wf-tdd")
if err := os.MkdirAll(skillsDir, 0o755); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(skillsDir, "SKILL.md"), []byte(`---
name: tdd-bugfix
name: archie-wf-tdd
description: TDD bugfix workflow
version: 1.0.0
metadata:
archie:
workflow: tdd
---
Analyse the bug. Write repro tests. Fix.
`), 0o644); err != nil {