-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Description
Traits.yaml line 175 has {PRINCIPAL.NAME}: as a bare YAML mapping key. Because {...} is YAML flow mapping syntax, any standard YAML parser throws a YAMLParseError on this line. This completely breaks ComposeAgent.ts --load for all custom agents, not just those referencing {PRINCIPAL.NAME}.
Impact
ComposeAgent.ts --load <any-agent>fails withYAMLParseErrorbefore it ever reads the agent file- The Agents skill cannot load
Traits.yamlfor any operation that parses the full file - All custom agents created via
--savecannot be reloaded via--load - This affects PAI v4.0.3 (confirmed in
Releases/v4.0.3/.claude/skills/Agents/Data/Traits.yaml)
Steps to Reproduce
# 1. Create any custom agent
bun run ~/.claude/skills/Agents/Tools/ComposeAgent.ts \
--traits "technical,systematic,thorough" \
--task "test agent" --save
# 2. Try to reload it
bun run ~/.claude/skills/Agents/Tools/ComposeAgent.ts --load technical-specialist-systematicExpected: Agent reloads successfully
Actual: YAMLParseError at line 175
YAMLParseError: Map comment with trailing content at line 175, column 5:
{PRINCIPAL.NAME}:
^
Root Cause
In skills/Agents/Data/Traits.yaml, line 175:
{PRINCIPAL.NAME}:
voice_id: "onwK4e9ZLuTAKqWW03F9"The curly braces are interpreted as YAML flow mapping syntax, not as a template variable placeholder.
Fix
Quote the key. One-character change:
"{PRINCIPAL.NAME}":
voice_id: "onwK4e9ZLuTAKqWW03F9"This was the only unquoted {PRINCIPAL.NAME}: instance used as a YAML mapping key in the file. Other occurrences (as values like default: "{PRINCIPAL.NAME}") are already properly quoted.
Related Issues
- [Bug Report] Unresolved placeholders and phantom refs in 8+ skills #815 — Audits
{PRINCIPAL.NAME}placeholders across skills but does not identify this YAML-breaking instance - Template variables {PRINCIPAL.NAME} and {DAIDENTITY.NAME} not resolved for deferred skills #863 —
{PRINCIPAL.NAME}not resolved in deferred skills (different symptom, same template variable) - v4.0.3: Unresolved template variable {PRINCIPAL.NAME} in CONTEXT_ROUTING.md #878 —
{PRINCIPAL.NAME}in CONTEXT_ROUTING.md (different file)
Environment
- PAI v4.0.3
- macOS Darwin 25.3.0
- bun 1.x
- yaml npm package (used by ComposeAgent.ts)
How We Found It
While building a custom Agent Browser orchestration skill (_ABWORKFLOWS), we created a custom agent (AgentBrowserAgent.md) and attempted to use ComposeAgent --load to verify it could be reloaded. The YAML parse error occurred immediately, before our agent file was even read. Tracing the error to position 6585 in Traits.yaml led us to the unquoted {PRINCIPAL.NAME}: key at line 175.