Repository navigation
refactor(frontmatter): simplify the root-line check and align custom-field docs - #908
Merged
Merged
Conversation
…field docs Follow-up to #901. IsRootFrontmatterLine took the caller's trimmed line only to test for blank and comment lines, and its callers disagreed on how they trimmed it (ParseSkillName trimmed spaces and tabs on the left, the rest trimmed all whitespace). The helper now trims the raw line itself, so there is one definition of a blank line and one argument fewer to get wrong. Two tests added in #901 covered behaviour that change did not touch. The ParseFrontmatterFields row is removed, and the ParseFrontmatterMap test is reduced to the one case that guards what the skill format page promises: nested metadata mappings and lists are kept. Docs: the skill format page now recommends metadata for custom fields, but the "Version tracking" example in creating-skills still showed top-level version and author. It now matches. The sentence saying sync preserves existing last_edited values is shortened, because skillshare has no such field and the wording suggested it does. Both edits are applied to en, ja, ko, zh-Hans and zh-Hant.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
Follow-up to #901. No issue.
What changed
utils.IsRootFrontmatterLineno longer takes the caller's trimmed line. It trims the raw line itself to detect blank and comment lines. The six callers pass one argument fewer.ParseFrontmatterFields"scalar projection" row and reducedTestParseFrontmatterMap_NestedMetadataPreservedto one case. Both covered code that fix(frontmatter): isolate root identity and hub index tags #901 did not change. The remaining case guards what the skill format page promises: nested metadata mappings and lists are kept.creating-skills.mdnow putsversionandauthorundermetadata, matching the "Prefermetadatafor custom fields" guidance added in fix(frontmatter): isolate root identity and hub index tags #901. The sentence inskill-format.mdabout sync preservinglast_editedvalues is shortened to "Sync preserves the SKILL.md content." Both edits are applied to en, ja, ko, zh-Hans and zh-Hant.Why
trimmed:ParseSkillNametrimmed spaces and tabs on the left, the other five trimmed all whitespace. One definition of a blank line removes that difference.last_editedfield, and the old sentence read as if it did.Behaviour
No change for realistic files. The one difference is inside
ParseSkillName: a frontmatter line holding only unusual whitespace (for example a lone\ror a non-breaking space) is now treated as blank instead of as content. The returned name is the same, because the old path fell back to decoding the whole block.Validation
In a temporary container from the devcontainer image, mounted on this branch's worktree:
make checkpassed (docs check, format check, lint, unit and integration tests, herdr tests).python3 scripts/ai-context.py checkpassed on the host.Not run: the website production build. The doc edits change one YAML example and one sentence per locale.
make checkran before a redundant agent-name test was dropped from the working tree; the committed tree differs from the checked one only by that removed test function. CI covers the final commit.Not covered
hub indexreads only roottags, while hub drafts still prefermetadata.tagsin list form. Making the two agree needs a decision on direction and is left for a separate change.Checklist
make check) — for code changes