Skip to content

fix(pr-review-toolkit): repair invalid YAML frontmatter in all agents - #87077

Open
anishsamant wants to merge 1 commit into
anthropics:mainfrom
anishsamant:fix/pr-review-toolkit-yaml-frontmatter
Open

anishsamant wants to merge 1 commit into
anthropics:mainfrom
anishsamant:fix/pr-review-toolkit-yaml-frontmatter

Conversation

@anishsamant

Copy link
Copy Markdown

Every agent's description was a single unquoted scalar containing dialogue lines like Daisy: "..." / Assistant: "...". In YAML, key: value inside an unquoted scalar is parsed as a nested mapping, which is invalid in that position — so the agent loads with
empty frontmatter (name/description/model/color all silently dropped) and can't be selected by description-based routing.

silent-failure-hunter.md was reported (#86748); the same defect was present in the other five agents in this plugin, so all six are converted to a description: | literal block scalar. A block scalar was used instead of quoting so the embedded double quotes in the dialogue examples don't need escaping.

Body content and description text are otherwise unchanged — only the frontmatter encoding.

Verified

  • All 6 files now parse with yaml.safe_load (previously all 6 failed)
  • Description text is unchanged (whitespace-normalized diff against the old unquoted
    values is empty)
  • Markdown body below the frontmatter is byte-for-byte identical

Fixes #86748

Every agent's description was a single unquoted scalar containing
dialogue lines like Daisy: "..." / Assistant: "...", which YAML
parses as an illegal nested mapping. That leaves the agent loading
with empty frontmatter (name/description/model/color all silently
dropped), so it can't be selected by description-based routing.

silent-failure-hunter.md was reported (anthropics#86748); the same defect was
present in the other five agents in this plugin, so all six are
converted to a `description: |` block scalar. Body content and
description text are unchanged, only the frontmatter encoding.

Fixes anthropics#86748

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@inth3shadows

Copy link
Copy Markdown

This overlaps #91871, which measured the same class against the actual loader (claude -p --debug) rather than a YAML library. Of the 6 files here, code-simplifier.md is the one that #91871 found actually fails to load — the other 5 parse fine today, so this PR is a correctness cleanup for them and a real fix for that one. The remaining 3 loader-breaking files are plugin-dev/agents/{agent-creator,plugin-validator,skill-reviewer}.md, same root cause, untouched here.

@rahzar005-dotcom

Copy link
Copy Markdown

Applications of the sample is not given

@AngelaBYUI

Copy link
Copy Markdown

This looks like a helpful fix. I’m new to YAML frontmatter, but using the literal block seems like a good approach for handling the dialogue examples without having to escape all the quotes.

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.

pr-review-toolkit: silent-failure-hunter agent has invalid YAML frontmatter, loads with empty metadata

4 participants