Skip to content

fix(runtime): parse skill frontmatter as YAML - #1058

Open
Afloat16 wants to merge 1 commit into
Tencent:mainfrom
Afloat16:fix/skill-yaml-frontmatter
Open

Afloat16 wants to merge 1 commit into
Tencent:mainfrom
Afloat16:fix/skill-yaml-frontmatter

Conversation

@Afloat16

Copy link
Copy Markdown

What changed

Skill descriptions were parsed one physical line at a time. Valid folded/literal YAML descriptions became the text >- or |-, quoted apostrophes/comments were interpreted incorrectly, and replacing a block-scalar skill name left its continuation lines behind, producing malformed YAML.

Use the repository's existing YAML dependency to decode top-level metadata and merge updated fields into the parsed document. This preserves unknown/nested metadata and the instruction body while removing all of a replaced scalar. Matching frontmatter remains byte-for-byte unchanged; no new dependency is added.

Scope

  • Platform core / API / runner

Compatibility

No schema, API, dependency, or runner-protocol changes.

Validation

  • Reproduced folded/literal description loss, apostrophe/comment decoding errors, and malformed YAML after name replacement on the base branch.
  • Passed go test ./internal/runtime -run 'Test.*Skill|TestHasClosedFrontmatter' -count=1, including existing skill materialization/frontmatter tests.
  • Passed git diff --check.
  • Full platform/browser CI was not run locally.

Safety

  • I did not include credentials, internal endpoints, production data, or organization-specific infrastructure.
  • I preserved user files and unrelated changes.
  • No generated Classic bundles or third-party content changed.

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