-
Notifications
You must be signed in to change notification settings - Fork 97
WindsurfRule does not generate frontmatter in output files #1438
Copy link
Copy link
Open
Description
Windsurf requires YAML frontmatter - title, trigger, globs - in rule files under .windsurf/rules, but the WindsurfRule class does not compose front matter into the generated file content.
Root cause
WindsurfRule.fromRulesyncRule() delegates to buildToolRuleParamsDefault(), which sets fileContent = ruleSyncRule.getBody . Description and globs are passed as properties on the returned object but they're not serialized into fileContent.
Contrast to CopilotRule, which has a custom constructor which calls stringify(body, frontmatter) - source
super({
...rest,
// If the rule is a root rule, the file content does not contain frontmatter.
fileContent: rest.root ? body : stringifyFrontmatter(body, frontmatter),
});Expected behavior
Generated .windsurf/rules/*.md should include Windsurf specific frontmatter e.g.
---
title: My Rule
trigger: always_on
---
Or for glob scoped rules
---
title: My Rule
trigger: glob
globs: **/**.swift
---
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels