@@ -14,6 +14,7 @@ type Format struct {
1414 FileExtension string
1515 IsSingleFile bool
1616 SingleFilePath string
17+ Description string
1718}
1819
1920// GetFormat returns a Format for the given format name
@@ -25,6 +26,7 @@ func GetFormat(formatName string) Format {
2526 DirectoryPrefix : ".rules" ,
2627 FileExtension : ".md" ,
2728 IsSingleFile : false ,
29+ Description : "Default rules format" ,
2830 }
2931 }
3032
@@ -36,20 +38,23 @@ func GetFormat(formatName string) Format {
3638 DirectoryPrefix : ".continue/rules" ,
3739 FileExtension : ".md" ,
3840 IsSingleFile : false ,
41+ Description : "Continue Dev rules" ,
3942 }
4043 case "cursor" :
4144 return Format {
4245 Name : "cursor" ,
4346 DirectoryPrefix : ".cursor/rules" ,
4447 FileExtension : ".mdc" ,
4548 IsSingleFile : false ,
49+ Description : "Cursor rules" ,
4650 }
4751 case "windsurf" :
4852 return Format {
4953 Name : "windsurf" ,
5054 DirectoryPrefix : ".windsurf/rules" ,
5155 FileExtension : ".md" ,
5256 IsSingleFile : false ,
57+ Description : "Windsurf rules" ,
5358 }
5459 case "claude" :
5560 return Format {
@@ -58,13 +63,15 @@ func GetFormat(formatName string) Format {
5863 FileExtension : ".md" ,
5964 IsSingleFile : true ,
6065 SingleFilePath : "CLAUDE.md" ,
66+ Description : "Claude Code single file" ,
6167 }
6268 case "copilot" :
6369 return Format {
6470 Name : "copilot" ,
6571 DirectoryPrefix : ".github/instructions" ,
6672 FileExtension : ".instructions.md" ,
6773 IsSingleFile : false ,
74+ Description : "GitHub Copilot instructions" ,
6875 }
6976 case "codex" :
7077 return Format {
@@ -73,20 +80,23 @@ func GetFormat(formatName string) Format {
7380 FileExtension : ".md" ,
7481 IsSingleFile : true ,
7582 SingleFilePath : "AGENT.md" ,
83+ Description : "Codex single file" ,
7684 }
7785 case "cline" :
7886 return Format {
7987 Name : "cline" ,
8088 DirectoryPrefix : ".clinerules" ,
8189 FileExtension : ".md" ,
8290 IsSingleFile : false ,
91+ Description : "Cline rules" ,
8392 }
8493 case "cody" :
8594 return Format {
8695 Name : "cody" ,
8796 DirectoryPrefix : ".sourcegraph" ,
8897 FileExtension : ".rule.md" ,
8998 IsSingleFile : false ,
99+ Description : "Sourcegraph Cody rules" ,
90100 }
91101 case "amp" :
92102 return Format {
@@ -95,6 +105,7 @@ func GetFormat(formatName string) Format {
95105 FileExtension : ".md" ,
96106 IsSingleFile : true ,
97107 SingleFilePath : "AGENT.md" ,
108+ Description : "Amp single file" ,
98109 }
99110 default :
100111 // For any other format, use .<format>/rules
@@ -103,6 +114,7 @@ func GetFormat(formatName string) Format {
103114 DirectoryPrefix : fmt .Sprintf (".%s/rules" , formatName ),
104115 FileExtension : ".md" ,
105116 IsSingleFile : false ,
117+ Description : fmt .Sprintf ("%s rules" , formatName ),
106118 }
107119 }
108120}
@@ -197,3 +209,19 @@ func RenderRules(sourceDir string, targetFormat Format) error {
197209 // Use the transformer to process the rule files
198210 return ProcessRuleFiles (sourceDir , targetFormat )
199211}
212+
213+ // GetAllFormats returns a list of all supported formats
214+ func GetAllFormats () []Format {
215+ formats := []Format {
216+ GetFormat ("continue" ),
217+ GetFormat ("cursor" ),
218+ GetFormat ("windsurf" ),
219+ GetFormat ("claude" ),
220+ GetFormat ("copilot" ),
221+ GetFormat ("codex" ),
222+ GetFormat ("cline" ),
223+ GetFormat ("cody" ),
224+ GetFormat ("amp" ),
225+ }
226+ return formats
227+ }
0 commit comments