Skip to content

feat: fix skill transformation pipeline across all targets#334

Merged
tmchow merged 1 commit intomainfrom
feat/repo-analyst-caching
Mar 22, 2026
Merged

feat: fix skill transformation pipeline across all targets#334
tmchow merged 1 commit intomainfrom
feat/repo-analyst-caching

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented Mar 22, 2026

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

  • Pass-through skill directories now get transformed: Previously only the Codex writer transformed SKILL.md content in copied skill directories — the other 6 targets used copyDir() verbatim. All writers now apply their target-specific transforms via a shared copySkillDir utility (src/utils/files.ts).
  • Task regex fixes: All 7 converters now correctly handle namespaced agent names (e.g. compound-engineering:research:repo-research-analyst) and zero-argument calls like Task agent(). The regex was using [^)]+ (one or more) instead of [^)]* (zero or more).

Scoped repo-research-analyst invocation

  • Adds a 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.
  • Removes quotes from scoped Task args in ce-plan and ce-plan-beta skills so the agent receives Scope: literally (not "Scope:).

Test plan

  • All 364 tests pass across 39 test files
  • Writer-layer tests verify SKILL.md content is transformed for all 7 targets (Codex, Copilot, Droid, Gemini, Kiro, Pi, Windsurf)
  • Converter tests cover namespaced and zero-arg Task calls for all 7 converters
  • Zero-arg output format verified per-target (no trailing "to:", no empty task="", etc.)

…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.
@tmchow tmchow changed the title feat: fix Task call transforms and add scoped repo-research-analyst feat: fix skill transformation pipeline across all targets Mar 22, 2026
@tmchow tmchow merged commit 4087e1d into main Mar 22, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 22, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +109 to +110
// 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant