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 with YAMLParseError before it ever reads the agent file
- The Agents skill cannot load
Traits.yaml for any operation that parses the full file
- All custom agents created via
--save cannot 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-systematic
Expected: 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
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.
Description
Traits.yamlline 175 has{PRINCIPAL.NAME}:as a bare YAML mapping key. Because{...}is YAML flow mapping syntax, any standard YAML parser throws aYAMLParseErroron this line. This completely breaksComposeAgent.ts --loadfor all custom agents, not just those referencing{PRINCIPAL.NAME}.Impact
ComposeAgent.ts --load <any-agent>fails withYAMLParseErrorbefore it ever reads the agent fileTraits.yamlfor any operation that parses the full file--savecannot be reloaded via--loadReleases/v4.0.3/.claude/skills/Agents/Data/Traits.yaml)Steps to Reproduce
Expected: Agent reloads successfully
Actual: YAMLParseError at line 175
Root Cause
In
skills/Agents/Data/Traits.yaml, line 175:The curly braces are interpreted as YAML flow mapping syntax, not as a template variable placeholder.
Fix
Quote the key. One-character change:
This was the only unquoted
{PRINCIPAL.NAME}:instance used as a YAML mapping key in the file. Other occurrences (as values likedefault: "{PRINCIPAL.NAME}") are already properly quoted.Related Issues
{PRINCIPAL.NAME}placeholders across skills but does not identify this YAML-breaking instance{PRINCIPAL.NAME}not resolved in deferred skills (different symptom, same template variable){PRINCIPAL.NAME}in CONTEXT_ROUTING.md (different file)Environment
How We Found It
While building a custom Agent Browser orchestration skill (
_ABWORKFLOWS), we created a custom agent (AgentBrowserAgent.md) and attempted to useComposeAgent --loadto 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.