Skip to content

fix: wrap agent description fields in YAML block scalars#44055

Open
innichang wants to merge 1 commit intoanthropics:mainfrom
innichang:fix/agent-yaml-descriptions
Open

fix: wrap agent description fields in YAML block scalars#44055
innichang wants to merge 1 commit intoanthropics:mainfrom
innichang:fix/agent-yaml-descriptions

Conversation

@innichang
Copy link
Copy Markdown

@innichang innichang commented Apr 6, 2026

Summary

  • All 6 agent files in plugins/pr-review-toolkit/agents/ had invalid YAML frontmatter causing the error: mapping values are not allowed in this context
  • The description fields contained unquoted scalars with colon-space sequences (Context: , user: , Examples: ) that YAML interprets as mapping key-value separators
  • code-simplifier.md was the worst case — the description bled across multiple actual lines with Context:, user:, assistant: being parsed as YAML keys

Fix:

  • Converted all description: fields to |- block scalars with 2-space indentation, and expanded literal \n escape sequences into actual newlines.

Test plan

  • Verified all 6 agent files have description: |- block scalar structure
  • Manually confirmed YAML frontmatter structure is valid in each file

Unquoted description values containing colon-space sequences (Context:,
user:, assistant:, Examples:) were being parsed as YAML mapping keys,
causing "mapping values are not allowed in this context" errors.

Changed all 6 agent files to use |-  block scalars for the description
field. Also fixed code-simplifier.md where the description was bleeding
across multiple actual lines into the frontmatter body.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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