You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In CopilotRule.fromRulesyncRule(), there is a comment stating "no frontmatter for root file", yet a frontmatter object is still passed to the constructor when creating a root rule. The comment and the implementation are inconsistent.
Evidence
In src/features/rules/copilot-rule.ts around line 167–177:
if(root){// Root file: .github/copilot-instructions.md (no frontmatter for root file)returnnewCopilotRule({baseDir: baseDir,frontmatter: copilotFrontmatter,// ← passed despite the comment above
body,relativeDirPath: paths.root.relativeDirPath,relativeFilePath: paths.root.relativeFilePath,
validate,
root,});}
The frontmatter field is passed to the constructor, but when generating the file content (in getFileContent()), root files skip frontmatter serialization:
fileContent: rest.root ? body : stringifyFrontmatter(body,frontmatter),
So the frontmatter is silently discarded at serialization time. While this avoids visible breakage today, the code's intention is unclear and could become a bug source in future refactors.
Expected Behavior
Either:
Root rules should pass frontmatter: undefined (or {}) explicitly to match the stated intent, or
The comment should be updated to explain why frontmatter is provided but intentionally unused.
Activity
fix(permissions): address review findings (round 1) for kilo/augmentc…
refactor(kilo): make subagent validate() pure and tidy schema (PR dyo…