-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_release.py
executable file
·42 lines (29 loc) · 1.14 KB
/
build_release.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python3
import os
from runner.models.model_codegen import build_release_rules
MDC_FRONTMATTER = """---
description: Guidelines and best practices for building Convex projects, including database schema design, queries, mutations, and real-world examples
globs: **/*.ts,**/*.tsx,**/*.js,**/*.jsx
---
"""
def main():
os.makedirs("dist", exist_ok=True)
with open("dist/anthropic_convex_rules.txt", "w") as f:
f.write(build_release_rules())
with open("dist/openai_convex_rules.txt", "w") as f:
f.write(build_release_rules())
# Generate MDC files with frontmatter
with open("dist/anthropic_convex_rules.mdc", "w") as f:
f.write(MDC_FRONTMATTER)
f.write(build_release_rules())
with open("dist/openai_convex_rules.mdc", "w") as f:
f.write(MDC_FRONTMATTER)
f.write(build_release_rules())
# Generic rules for all models
with open("dist/convex_rules.txt", "w") as f:
f.write(build_release_rules())
with open("dist/convex_rules.mdc", "w") as f:
f.write(MDC_FRONTMATTER)
f.write(build_release_rules())
if __name__ == "__main__":
main()