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

+2 -1
View File
@@ -24,7 +24,7 @@ func TestSkillPluginsAvailableDuringStageExecution(t *testing.T) {
// accessible via the TaskContext.
dir := t.TempDir()
skillsDir := filepath.Join(dir, ".agents", "skills", "tdd-bugfix")
skillsDir := filepath.Join(dir, ".agents", "skills", "archie-wf-tdd")
pluginsDir := filepath.Join(skillsDir, "plugins")
if err := os.MkdirAll(pluginsDir, 0o755); err != nil {
t.Fatal(err)
@@ -39,6 +39,7 @@ metadata:
archie:
tools: [go]
engine: any
workflow: tdd
---
Analyse the bug, write repro tests, fix.
`), 0o644); err != nil {