fix(skills): use block sequences for YAML frontmatter#541
fix(skills): use block sequences for YAML frontmatter#541dumko2001 wants to merge 3 commits intogoogleworkspace:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 712be4b The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request standardizes the YAML frontmatter format within Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully standardizes the bins field in the YAML frontmatter to use block sequences instead of flow sequences. This change aligns with the objective of improving compatibility with strict YAML 1.1 parsers, as described in the pull request. The modifications are consistent across all instances in src/generate_skills.rs.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request aims to standardize YAML frontmatter to use block sequences instead of flow sequences. The changes correctly update the bins field to a block sequence in several skill generation functions. However, the skills field in render_persona_skill and render_recipe_skill is still being generated as a flow sequence, which is inconsistent with the stated goal. I've left comments on the related changes with suggestions on how to fully implement the intended standardization for the skills field as well.
| bins: | ||
| - "gws" |
There was a problem hiding this comment.
While you've correctly converted bins to a block sequence, the skills field on the following line (781) is still being generated as a flow sequence. This is inconsistent with the PR's goal of using block sequences for compatibility.
To fix this, you'll need to adjust how required_skills is generated (lines 761-766) and update the format string.
-
Update the
required_skillsgeneration:let required_skills = persona .services .iter() .map(|s| format!("\n - \"gws-{s}\"")) .collect::<String>();
-
Update the
skillsline in the template string:- skills: [{skills}] + skills:{skills}
| bins: | ||
| - "gws" |
There was a problem hiding this comment.
Similar to the issue in render_persona_skill, while bins is now a block sequence, the skills field on the next line (853) is still a flow sequence. To be consistent with the PR's goal, this should also be converted to a block sequence.
To fix this, you'll need to adjust how required_skills is generated (lines 832-837) and update the format string.
-
Update the
required_skillsgeneration:let required_skills = recipe .services .iter() .map(|s| format!("\n - \"gws-{s}\"")) .collect::<String>();
-
Update the
skillsline in the template string:- skills: [{skills}] + skills:{skills}
|
/gemini review |
There was a problem hiding this comment.
Code Review
The pull request successfully updates the bins field in the YAML frontmatter of SKILL.md files to use block sequences, which aligns with the goal of improving compatibility with strict YAML 1.1 parsers. However, the pull request description also states that the skills field should be standardized to use block sequences, but this change has not been applied. The skills field still uses flow sequences, which might lead to continued compatibility issues for that specific field. This omission means the pull request does not fully achieve its stated objective.
Description
Standardize
SKILL.mdfrontmatter by using YAML block sequences instead of flow sequences for thebinsandskillsfields. This ensures compatibility withagentskillsand other LLM agent validation tools that use strict YAML 1.1 parsers.Fixes #521
Checklist:
AGENTS.mdguidelines (no generatedgoogle-*crates).cargo fmt --allto format the code perfectly.cargo clippy -- -D warningsand resolved all warnings.pnpx changeset) to document my changes.