-
Notifications
You must be signed in to change notification settings - Fork 88
Feature: per-target agent frontmatter transformation during deployment #581
Copy link
Copy link
Open
Description
Problem
When APM deploys agent .md files from a marketplace plugin to multiple targets (Claude Code, OpenCode, Codex, etc.), it copies the same file verbatim to each target directory (.claude/agents/, .opencode/agents/, .codex/agents/).
This causes errors when agent frontmatter fields use platform-specific formats:
tools field
- Claude Code expects: comma-separated string or array →
tools: Read, Grep, Globortools: ["Read", "Grep"] - OpenCode expects: record/object →
tools: {write: false, bash: false} - Result: OpenCode rejects the Claude format with
"expected record, received array"
color field
- Claude Code expects: named colors →
color: cyan - OpenCode expects: hex or theme names →
color: "#00FFFF"orcolor: warning - Result: OpenCode rejects named colors with
"Invalid hex color format"
Current workaround
Remove both fields entirely so agents work on all platforms (agents inherit all tools and use default colors). This loses tool restrictions and visual identity.
Proposed solution
During apm install --target <platform>, APM should transform agent frontmatter fields to the target platform's expected format:
tools: Convert between array (Claude) and record (OpenCode) formatscolor: Convert between named colors (Claude) and hex/theme colors (OpenCode)- Unknown fields: Strip fields not supported by the target platform (e.g., Codex uses TOML, not markdown frontmatter)
This would allow plugin authors to write agent files once in any supported format, and APM would handle the translation during deployment.
Environment
- APM version: 0.8.10
- Plugin:
data-goblin/power-bi-agentic-developmentv0.17.2 - Targets affected: OpenCode (confirmed), potentially Codex and Cursor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels