feat: fix skill transformation pipeline across all targets#334
Conversation
…ed repo-research-analyst invocation - Fix pass-through skills: SKILL.md files in copied skill directories are now transformed by all 7 target writers, not just Codex. Extract shared `copySkillDir` utility that applies target-specific content transforms. - Fix Task regex across all converters: support namespaced agent names (colons) and zero-argument Task calls (`[^)]*` instead of `[^)]+`). - Add scoped invocation protocol to repo-research-analyst agent so consumers can request specific research phases via `Scope:` prefix. - Remove quotes from scoped Task args in ce-plan and ce-plan-beta skills so the agent receives `Scope:` literally (not `"Scope:`). - Add comprehensive test coverage: writer-layer tests verify SKILL.md transformation for all 7 targets, including namespaced and zero-arg Task calls. Converter tests cover the same edge cases.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d08969674
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // 1. Transform Task agent calls (supports namespaced names like compound-engineering:research:agent-name) | ||
| const taskPattern = /^(\s*-?\s*)Task\s+([a-z][a-z0-9:-]*)\(([^)]*)\)/gm |
There was a problem hiding this comment.
Handle numbered and inline Task syntax in copied skills
The new taskPattern only rewrites Task agent(args) when it starts a line with an optional -, but several shipped pass-through skills use other Task forms: plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md:52 has 1. Task ..., plugins/compound-engineering/skills/ce-review/SKILL.md:240 has inline Run the Task ..., and plugins/compound-engineering/skills/deepen-plan/SKILL.md:105 uses Task general-purpose: "...". Because this patch now runs the copied SKILL.md files through these transformers, those existing skills will still be installed with raw Claude-only Task syntax on Copilot/Gemini/Kiro/Pi/Windsurf/Codex/Droid, leaving several converted workflows unusable despite the new “fix Task call transforms” path.
Useful? React with 👍 / 👎.
Summary
Fixes the skill transformation pipeline so that Task calls inside SKILL.md files are correctly rewritten for all 7 target platforms, and adds scoped invocation support to the repo-research-analyst agent.
Skill transformation fixes
SKILL.mdcontent in copied skill directories — the other 6 targets usedcopyDir()verbatim. All writers now apply their target-specific transforms via a sharedcopySkillDirutility (src/utils/files.ts).compound-engineering:research:repo-research-analyst) and zero-argument calls likeTask agent(). The regex was using[^)]+(one or more) instead of[^)]*(zero or more).Scoped repo-research-analyst invocation
Scope:prefix protocol to the repo-research-analyst agent so consumers can request specific research phases (technology, architecture, patterns, conventions, issues, templates) instead of always running all phases.ce-planandce-plan-betaskills so the agent receivesScope:literally (not"Scope:).Test plan
task="", etc.)