rulesync 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -666,15 +666,15 @@ async function initCommand() {
666
666
  async function createSampleFiles(aiRulesDir) {
667
667
  const sampleFiles = [
668
668
  {
669
- filename: "coding-rules.md",
669
+ filename: "overview.md",
670
670
  content: `---
671
671
  root: true
672
672
  targets: ["*"]
673
- description: "General coding standards and best practices"
673
+ description: "Project overview and general development guidelines"
674
674
  globs: ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx"]
675
675
  ---
676
676
 
677
- # Coding Rules
677
+ # Project Overview
678
678
 
679
679
  ## General Guidelines
680
680
 
@@ -690,54 +690,94 @@ globs: ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx"]
690
690
  - Use semicolons
691
691
  - Use double quotes for strings
692
692
  - Use trailing commas in multi-line objects and arrays
693
+
694
+ ## Architecture Principles
695
+
696
+ - Organize code by feature, not by file type
697
+ - Keep related files close together
698
+ - Use dependency injection for better testability
699
+ - Implement proper error handling
700
+ - Follow single responsibility principle
693
701
  `
694
702
  },
695
703
  {
696
- filename: "naming-conventions.md",
704
+ filename: "frontend.md",
697
705
  content: `---
698
706
  root: false
699
707
  targets: ["*"]
700
- description: "Naming conventions for variables, functions, and files"
701
- globs: ["**/*.ts", "**/*.js"]
708
+ description: "Frontend development rules and best practices"
709
+ globs: ["src/components/**/*.tsx", "src/pages/**/*.tsx", "**/*.css", "**/*.scss"]
702
710
  ---
703
711
 
704
- # Naming Conventions
712
+ # Frontend Development Rules
713
+
714
+ ## React Components
715
+
716
+ - Use functional components with hooks
717
+ - Follow PascalCase naming for components
718
+ - Use TypeScript interfaces for props
719
+ - Implement proper error boundaries
720
+
721
+ ## Styling
722
+
723
+ - Use CSS modules or styled-components
724
+ - Follow BEM methodology for CSS classes
725
+ - Prefer flexbox and grid for layouts
726
+ - Use semantic HTML elements
727
+
728
+ ## State Management
705
729
 
706
- ## Variables and Functions
707
- - Use camelCase for variables and functions
708
- - Use descriptive names that explain the purpose
709
- - Avoid abbreviations unless they are well-known
730
+ - Use React hooks for local state
731
+ - Consider Redux or Zustand for global state
732
+ - Avoid prop drilling with context API
733
+ - Keep state as close to where it's used as possible
710
734
 
711
- ## Files and Directories
712
- - Use kebab-case for file names
713
- - Use PascalCase for component files
714
- - Use lowercase for directory names
735
+ ## Performance
715
736
 
716
- ## Constants
717
- - Use SCREAMING_SNAKE_CASE for constants
718
- - Group related constants in enums or const objects
737
+ - Use React.memo for expensive components
738
+ - Implement lazy loading for routes
739
+ - Optimize images and assets
740
+ - Use proper key props in lists
719
741
  `
720
742
  },
721
743
  {
722
- filename: "architecture.md",
744
+ filename: "backend.md",
723
745
  content: `---
724
746
  root: false
725
- targets: ["copilot", "cursor"]
726
- description: "Architectural patterns and project structure guidelines"
727
- globs: ["src/**/*.ts"]
747
+ targets: ["*"]
748
+ description: "Backend development rules and API guidelines"
749
+ globs: ["src/api/**/*.ts", "src/services/**/*.ts", "src/models/**/*.ts"]
728
750
  ---
729
751
 
730
- # Architecture Guidelines
752
+ # Backend Development Rules
731
753
 
732
- ## Project Structure
733
- - Organize code by feature, not by file type
734
- - Keep related files close together
735
- - Use index files for clean imports
754
+ ## API Design
736
755
 
737
- ## Design Patterns
738
- - Use dependency injection for better testability
739
- - Implement proper error handling
740
- - Follow single responsibility principle
756
+ - Follow RESTful conventions
757
+ - Use consistent HTTP status codes
758
+ - Implement proper error handling with meaningful messages
759
+ - Use API versioning when necessary
760
+
761
+ ## Database
762
+
763
+ - Use proper indexing for performance
764
+ - Implement database migrations
765
+ - Follow naming conventions for tables and columns
766
+ - Use transactions for data consistency
767
+
768
+ ## Security
769
+
770
+ - Validate all input data
771
+ - Use proper authentication and authorization
772
+ - Implement rate limiting
773
+ - Sanitize database queries to prevent SQL injection
774
+
775
+ ## Code Organization
776
+
777
+ - Use service layer pattern
778
+ - Implement proper logging
779
+ - Use environment variables for configuration
780
+ - Write comprehensive tests for business logic
741
781
  `
742
782
  }
743
783
  ];
package/dist/index.mjs CHANGED
@@ -643,15 +643,15 @@ async function initCommand() {
643
643
  async function createSampleFiles(aiRulesDir) {
644
644
  const sampleFiles = [
645
645
  {
646
- filename: "coding-rules.md",
646
+ filename: "overview.md",
647
647
  content: `---
648
648
  root: true
649
649
  targets: ["*"]
650
- description: "General coding standards and best practices"
650
+ description: "Project overview and general development guidelines"
651
651
  globs: ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx"]
652
652
  ---
653
653
 
654
- # Coding Rules
654
+ # Project Overview
655
655
 
656
656
  ## General Guidelines
657
657
 
@@ -667,54 +667,94 @@ globs: ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx"]
667
667
  - Use semicolons
668
668
  - Use double quotes for strings
669
669
  - Use trailing commas in multi-line objects and arrays
670
+
671
+ ## Architecture Principles
672
+
673
+ - Organize code by feature, not by file type
674
+ - Keep related files close together
675
+ - Use dependency injection for better testability
676
+ - Implement proper error handling
677
+ - Follow single responsibility principle
670
678
  `
671
679
  },
672
680
  {
673
- filename: "naming-conventions.md",
681
+ filename: "frontend.md",
674
682
  content: `---
675
683
  root: false
676
684
  targets: ["*"]
677
- description: "Naming conventions for variables, functions, and files"
678
- globs: ["**/*.ts", "**/*.js"]
685
+ description: "Frontend development rules and best practices"
686
+ globs: ["src/components/**/*.tsx", "src/pages/**/*.tsx", "**/*.css", "**/*.scss"]
679
687
  ---
680
688
 
681
- # Naming Conventions
689
+ # Frontend Development Rules
690
+
691
+ ## React Components
692
+
693
+ - Use functional components with hooks
694
+ - Follow PascalCase naming for components
695
+ - Use TypeScript interfaces for props
696
+ - Implement proper error boundaries
697
+
698
+ ## Styling
699
+
700
+ - Use CSS modules or styled-components
701
+ - Follow BEM methodology for CSS classes
702
+ - Prefer flexbox and grid for layouts
703
+ - Use semantic HTML elements
704
+
705
+ ## State Management
682
706
 
683
- ## Variables and Functions
684
- - Use camelCase for variables and functions
685
- - Use descriptive names that explain the purpose
686
- - Avoid abbreviations unless they are well-known
707
+ - Use React hooks for local state
708
+ - Consider Redux or Zustand for global state
709
+ - Avoid prop drilling with context API
710
+ - Keep state as close to where it's used as possible
687
711
 
688
- ## Files and Directories
689
- - Use kebab-case for file names
690
- - Use PascalCase for component files
691
- - Use lowercase for directory names
712
+ ## Performance
692
713
 
693
- ## Constants
694
- - Use SCREAMING_SNAKE_CASE for constants
695
- - Group related constants in enums or const objects
714
+ - Use React.memo for expensive components
715
+ - Implement lazy loading for routes
716
+ - Optimize images and assets
717
+ - Use proper key props in lists
696
718
  `
697
719
  },
698
720
  {
699
- filename: "architecture.md",
721
+ filename: "backend.md",
700
722
  content: `---
701
723
  root: false
702
- targets: ["copilot", "cursor"]
703
- description: "Architectural patterns and project structure guidelines"
704
- globs: ["src/**/*.ts"]
724
+ targets: ["*"]
725
+ description: "Backend development rules and API guidelines"
726
+ globs: ["src/api/**/*.ts", "src/services/**/*.ts", "src/models/**/*.ts"]
705
727
  ---
706
728
 
707
- # Architecture Guidelines
729
+ # Backend Development Rules
708
730
 
709
- ## Project Structure
710
- - Organize code by feature, not by file type
711
- - Keep related files close together
712
- - Use index files for clean imports
731
+ ## API Design
713
732
 
714
- ## Design Patterns
715
- - Use dependency injection for better testability
716
- - Implement proper error handling
717
- - Follow single responsibility principle
733
+ - Follow RESTful conventions
734
+ - Use consistent HTTP status codes
735
+ - Implement proper error handling with meaningful messages
736
+ - Use API versioning when necessary
737
+
738
+ ## Database
739
+
740
+ - Use proper indexing for performance
741
+ - Implement database migrations
742
+ - Follow naming conventions for tables and columns
743
+ - Use transactions for data consistency
744
+
745
+ ## Security
746
+
747
+ - Validate all input data
748
+ - Use proper authentication and authorization
749
+ - Implement rate limiting
750
+ - Sanitize database queries to prevent SQL injection
751
+
752
+ ## Code Organization
753
+
754
+ - Use service layer pattern
755
+ - Implement proper logging
756
+ - Use environment variables for configuration
757
+ - Write comprehensive tests for business logic
718
758
  `
719
759
  }
720
760
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",