(fileName: string, input: CreateRuleInput)
| 389 | } |
| 390 | |
| 391 | function createRuleTemplate(fileName: string, input: CreateRuleInput): string { |
| 392 | const title = path.basename(fileName, ".md") |
| 393 | const modeLine = input.kind === "mode" ? ` for ${input.modeSlug} mode` : "" |
| 394 | |
| 395 | return `# ${title}\n\nAdd Zoo Code rule guidance${modeLine} here.\n` |
| 396 | } |
| 397 | |
| 398 | function compareRules(a: RuleMetadata, b: RuleMetadata): number { |
| 399 | const scopeOrder = { global: 0, project: 1 } satisfies Record<RuleScope, number> |