This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --- | |
| description: Code Quality Guidelines. Apply these rules when writing or reviewing code to ensure consistency and quality | |
| globs: | |
| --- | |
| # Code Quality Guidelines | |
| ## Verify Information | |
| - Always verify information before presenting it | |
| - Do not make assumptions or speculate without clear evidence | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --- | |
| description: Git Workflow Guidelines. Apply these rules when performing git operations | |
| globs: | |
| --- | |
| # Git Workflow Guidelines | |
| ## Main Branches | |
| ### Main (or Master) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --- | |
| description: Clean Code Guidelines. Guidelines for writing clean, maintainable, and human-readable code. Apply these rules when writing or reviewing code to ensure consistency and quality | |
| globs: | |
| --- | |
| # Clean Code Guidelines | |
| ## Constants Over Magic Numbers | |
| - Replace hard-coded values with named constants | |
| - Use descriptive constant names that explain the value's purpose | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --- | |
| description: Guidelines and best practices for building Convex projects, including database schema design, queries, mutations, and real-world examples | |
| globs: **/*.ts,**/*.tsx,**/*.js,**/*.jsx | |
| --- | |
| # Convex guidelines | |
| ## Function guidelines | |
| ### New function syntax | |
| - ALWAYS use the new function syntax for Convex functions. For example: | |
| ```typescript | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const addNestedField = (schema, typeName, fieldName) => { | |
| const typeInfo = new GRAPHQL.TypeInfo(schema); | |
| return (request) => { | |
| const document = GRAPHQL.visit( | |
| request.document, | |
| GRAPHQL.visitWithTypeInfo(typeInfo, { | |
| [GRAPHQL.Kind.SELECTION_SET]: (node) => { | |
| const parentType = typeInfo.getParentType(); | |
| const matchType = parentType && parentType.name === typeName; |