feat: fix skill transformation pipeline across all targets (#334)

This commit is contained in:
Trevin Chow
2026-03-21 19:45:20 -07:00
committed by GitHub
parent 0f6448d81c
commit 4087e1df82
33 changed files with 624 additions and 86 deletions

View File

@@ -391,6 +391,27 @@ Task best-practices-researcher(topic)`
expect(result).not.toContain("Task repo-research-analyst")
})
test("transforms namespaced Task agent calls using final segment", () => {
const input = `Run agents:
- Task compound-engineering:research:repo-research-analyst(feature_description)
- Task compound-engineering:review:security-reviewer(code_diff)`
const result = transformContentForKiro(input)
expect(result).toContain("Use the use_subagent tool to delegate to the repo-research-analyst agent: feature_description")
expect(result).toContain("Use the use_subagent tool to delegate to the security-reviewer agent: code_diff")
expect(result).not.toContain("compound-engineering:")
})
test("transforms zero-argument Task calls", () => {
const input = `- Task compound-engineering:review:code-simplicity-reviewer()`
const result = transformContentForKiro(input)
expect(result).toContain("Use the use_subagent tool to delegate to the code-simplicity-reviewer agent")
expect(result).not.toContain("compound-engineering:")
expect(result).not.toContain("code-simplicity-reviewer agent:")
})
test("transforms @agent references for known agents only", () => {
const result = transformContentForKiro("Ask @security-sentinel for a review.", ["security-sentinel"])
expect(result).toContain("the security-sentinel agent")