Awesome Cursor Rules Collection

Showing 2149-2160 of 2626 matches

Python
/* .cursorrules */

# 确保所有新文件都创建在正确的目录下
When creating a new file:
  - Use the file browser or command panel to navigate to the correct directory before creating a new file.
  - Do not create files in the root directory unless it's for a specific reason documented in the development documentation.
使用 // 作为单行中文注释的前缀
使用 /** */ 作为多行中文注释的包裹
将 Python 代码转换为 TypeScript 代码
为软件开发新功能添加类型定义
保持了相同的功能和结构
使用了 TypeScript 的类和接口特性


/* 1. 基础交互区域 */
.basic-interactions {
  /* 默认指针 */
  default: {
    cursor: default;
    area: ["non-interactive-content", "text-content", "background"];
  }

  /* 可点击元素 */
  clickable: {
    cursor: pointer;
    area: [
      "buttons",
      "links",
      "menu-items",
      "tabs",
      "card-actions",
      "interactive-icons"
    ];
  }

  /* 文本编辑 */
  text: {
    cursor: text;
    area: [
      "input-fields",
      "textareas",
      "editable-content",
      "search-boxes"
    ];
  }
}

/* 2. 健康数据交互 */
.health-data-interactions {
  /* 数据图表交互 */
  chart-interaction: {
    cursor: crosshair;
    area: [
      "data-charts",
      "health-graphs",
      "trend-lines",
      "data-points"
    ];
  }

  /* 可拖拽数据点 */
  data-point: {
    cursor: grab;
    active: grabbing;
    area: [
      "adjustable-thresholds",
      "customizable-goals",
      "timeline-markers"
    ];
  }

  /* 数据选择区域 */
  data-selection: {
    cursor: cell;
    area: [
      "data-tables",
      "metric-grids",
      "selection-ranges"
    ];
  }
}

/* 3. 医疗专业功能 */
.medical-interactions {
  /* 3D模型操作 */
  model-control: {
    cursor: move;
    active: grabbing;
    area: [
      "body-model-viewer",
      "organ-models",
      "anatomical-views"
    ];
  }

  /* 医疗图像缩放 */
  medical-zoom: {
    cursor: zoom-in;
    active: zoom-out;
    area: [
      "medical-images",
      "scan-results",
      "detailed-reports"
    ];
  }

  /* 测量工具 */
  measurement: {
    cursor: crosshair;
    area: [
      "measurement-tools",
      "analysis-regions",
      "comparison-views"
    ];
  }
}

/* 4. 状态指示器 */
.status-indicators {
  /* 加载状态 */
  loading: {
    cursor: wait;
    area: [
      "data-loading",
      "processing-requests",
      "sync-operations"
    ];
  }

  /* 禁用状态 */
  disabled: {
    cursor: not-allowed;
    area: [
      "disabled-buttons",
      "locked-features",
      "restricted-actions"
    ];
  }

  /* 帮助信息 */
  help: {
    cursor: help;
    area: [
      "help-icons",
      "tooltips",
      "information-markers"
    ];
  }
}

/* 5. 特殊交互区域 */
.special-interactions {
  /* 调整大小 */
  resize: {
    cursor: {
      horizontal: ew-resize;
      vertical: ns-resize;
      corner: nwse-resize;
    }
    area: [
      "resizable-panels",
      "split-views",
      "adjustable-containers"
    ];
  }

  /* 进度调节 */
  progress: {
    cursor: col-resize;
    area: [
      "progress-bars",
      "timeline-sliders",
      "range-controls"
    ];
  }

  /* 列表排序 */
  sortable: {
    cursor: move;
    active: grabbing;
    area: [
      "sortable-lists",
      "priority-items",
      "custom-orders"
    ];
  }
}

/* 6. 健康监测交互 */
.monitoring-interactions {
  /* 实时数据监测 */
  real-time: {
    cursor: crosshair;
    area: [
      "vital-signs-monitor",
      "ecg-display",
      "real-time-metrics"
    ];
  }

  /* 警报设置 */
  alert-config: {
    cursor: pointer;
    area: [
      "threshold-settings",
      "alert-controls",
      "notification-rules"
    ];
  }

  /* 数据标记 */
  data-marking: {
    cursor: cell;
    area: [
      "event-markers",
      "annotation-points",
      "highlight-regions"
    ];
  }
}

/* 7. 辅助功能支持 */
.accessibility {
  /* 高对比度模式 */
  high-contrast: {
    cursor: {
      size: 32px;
      contrast: high;
      outline: 2px solid #000000;
    }
  }

  /* 放大镜模式 */
  magnifier: {
    cursor: zoom-in;
    area: [
      "accessibility-content",
      "readable-text",
      "detailed-images"
    ];
  }

  /* 焦点指示 */
  focus-indicator: {
    cursor: default;
    outline: {
      style: solid;
      width: 2px;
      color: #2E7D32;
      radius: 4px;
    }
  }
}

/* 8. 开发者工具和调试 */
.developer-tools {
  /* 代码编辑 */
  code-edit: {
    cursor: text;
    area: [
      "code-editors",
      "script-tags",
      "style-blocks"
    ];
  }

  /* 调试模式 */
  debug-mode: {
    cursor: wait;
    area: [
      "debugger-active",
      "breakpoints",
      "debug-panels"
    ];
  }
}

/* 9. 文件管理和版本控制 */
.file-management {
  /* 文件操作 */
  file-operation: {
    cursor: pointer;
    area: [
      "file-explorer",
      "version-control",
      "project-tree"
    ];
  }

  /* 文件拖放 */
  file-drag: {
    cursor: grab;
    active: grabbing;
    area: [
      "file-drag-areas",
      "drop-zones"
    ];
  }
}

/* 10. 用户反馈和表单处理 */
.user-feedback {
  /* 表单提交 */
  form-submit: {
    cursor: pointer;
    area: [
      "submit-buttons",
      "form-actions"
    ];
  }

  /* 输入验证 */
  input-validation: {
    cursor: wait;
    area: [
      "input-validation",
      "error-indicators",
      "success-indicators"
    ];
  }
}

/* 基础交互规则 */

/* 1. 默认鼠标样式 */
body {
  cursor: default; /* 默认箭头样式 */
}

/* 2. 可点击元素 */
button,
a,
.clickable {
  cursor: pointer; /* 手型指针,表示可点击 */
}

/* 3. 文本编辑区域 */
input,
textarea,
[contenteditable="true"] {
  cursor: text; /* I形光标,表示可输入文本 */
}

/* 4. 禁用状态 */
button:disabled,
.disabled {
  cursor: not-allowed; /* 禁止符号,表示不可用 */
}

/* 5. 加载状态 */
.loading {
  cursor: progress; /* 进度指示器,表示正在加载 */
}

/* 6. 帮助提示 */
[title],
.help {
  cursor: help; /* 带问号的指针,表示有帮助信息 */
}

/* 7. 拖拽相关 */
.draggable {
  cursor: move; /* 移动十字箭头,表示可拖动 */
}

.dragging {
  cursor: grabbing; /* 抓取状态,表示正在拖动 */
}

/* 8. 调整大小 */
.resizable-h {
  cursor: ew-resize; /* 水平调整大小 */
}

.resizable-v {
  cursor: ns-resize; /* 垂直调整大小 */
}

/* 9. 链接悬停 */
a:hover {
  cursor: pointer; /* 手型指针,表示可点击的链接 */
}

/* 11. 健康数据分析交互 */
.data-analysis-interactions {
  /* 数据筛选 */
  data-filter: {
    cursor: pointer;
    area: [
      "filter-controls",
      "date-range-selectors",
      "category-filters",
      "metric-selectors"
    ];
  }

  /* 数据对比 */
  data-comparison: {
    cursor: col-resize;
    area: [
      "comparison-charts",
      "before-after-views",
      "trend-comparisons"
    ];
  }

  /* 数据导出 */
  data-export: {
    cursor: progress;
    area: [
      "export-buttons",
      "download-areas",
      "report-generators"
    ];
  }
}

/* 12. 用户隐私保护 */
.privacy-controls {
  /* 敏感数据区域 */
  sensitive-data: {
    cursor: not-allowed;
    area: [
      "masked-content",
      "protected-fields",
      "encrypted-data"
    ];
  }

  /* 授权操作 */
  authorization: {
    cursor: pointer;
    area: [
      "permission-controls",
      "consent-buttons",
      "access-management"
    ];
  }
}

/* 13. 远程医疗功能 */
.telemedicine {
  /* 视频会诊 */
  video-consultation: {
    cursor: move;
    area: [
      "video-windows",
      "camera-controls",
      "screen-sharing"
    ];
  }

  /* 实时通讯 */
  real-time-communication: {
    cursor: text;
    area: [
      "chat-input",
      "message-areas",
      "quick-responses"
    ];
  }
}

/* 14. 智能建议系统 */
.ai-recommendations {
  /* AI分析结果 */
  ai-analysis: {
    cursor: help;
    area: [
      "ai-insights",
      "recommendation-cards",
      "prediction-models"
    ];
  }

  /* 交互式建议 */
  interactive-suggestions: {
    cursor: pointer;
    area: [
      "suggestion-cards",
      "action-items",
      "follow-up-tasks"
    ];
  }
}

/* 15. 系统配置与管理 */
.system-management {
  /* 系统设置 */
  settings: {
    cursor: default;
    area: [
      "configuration-panels",
      "preference-controls",
      "system-options"
    ];
  }

  /* 用户管理 */
  user-management: {
    cursor: pointer;
    area: [
      "user-roles",
      "permission-settings",
      "access-controls"
    ];
  }
}

/* 16. 错误处理与反馈 */
.error-handling {
  /* 错误提示 */
  error-indication: {
    cursor: not-allowed;
    area: [
      "error-messages",
      "warning-alerts",
      "validation-errors"
    ];
  }

  /* 恢复操作 */
  recovery-actions: {
    cursor: pointer;
    area: [
      "retry-buttons",
      "recovery-options",
      "fallback-actions"
    ];
  }
}

/* 17. 数据同步状态 */
.sync-status {
  /* 同步进行中 */
  syncing: {
    cursor: progress;
    area: [
      "sync-indicators",
      "upload-status",
      "download-progress"
    ];
  }

  /* 离线模式 */
  offline-mode: {
    cursor: not-allowed;
    area: [
      "offline-indicators",
      "cached-content",
      "sync-pending"
    ];
  }
}

/* 18. 打印与报告 */
.report-generation {
  /* 打印预览 */
  print-preview: {
    cursor: zoom-in;
    area: [
      "preview-window",
      "page-navigation",
      "zoom-controls"
    ];
  }

  /* 报告编辑 */
  report-editing: {
    cursor: text;
    area: [
      "report-templates",
      "custom-fields",
      "signature-areas"
    ];
  }
}

/* 19. 健康教育与知识库 */
.health-education {
  /* 交互式学习内容 */
  interactive-learning: {
    cursor: pointer;
    area: [
      "educational-videos",
      "interactive-tutorials",
      "knowledge-quizzes"
    ];
  }

  /* 3D教学模型 */
  educational-model: {
    cursor: move;
    active: grabbing;
    area: [
      "anatomy-models",
      "procedure-demonstrations",
      "medical-animations"
    ];
  }
}

/* 20. 处方管理系统 */
.prescription-management {
  /* 处方开具 */
  prescription-writing: {
    cursor: text;
    area: [
      "medication-input",
      "dosage-selection",
      "prescription-template"
    ];
  }

  /* 药品信息查询 */
  medicine-lookup: {
    cursor: help;
    area: [
      "drug-database",
      "interaction-checker",
      "contraindication-alerts"
    ];
  }
}

/* 21. 医疗设备集成 */
.device-integration {
  /* 设备连接控制 */
  device-control: {
    cursor: pointer;
    area: [
      "device-pairing",
      "connection-status",
      "calibration-controls"
    ];
  }

  /* 数据采集 */
  data-collection: {
    cursor: progress;
    area: [
      "real-time-readings",
      "measurement-collection",
      "data-synchronization"
    ];
  }
}

/* 22. 紧急响应系统 */
.emergency-response {
  /* 紧急呼叫 */
  emergency-call: {
    cursor: pointer;
    area: [
      "emergency-buttons",
      "sos-triggers",
      "quick-contact"
    ];
  }

  /* 应急预案 */
  emergency-protocol: {
    cursor: help;
    area: [
      "protocol-guides",
      "emergency-contacts",
      "response-procedures"
    ];
  }
}


/* 23. 养生保健功能 */
.wellness-interactions {
  /* 穴位指导 */
  acupoint-guide: {
    cursor: help;
    area: [
      "acupoint-map",
      "massage-tutorials",
      "meridian-diagrams"
    ];
  }

  /* 冥想引导 */
  meditation-guide: {
    cursor: default;
    area: [
      "breathing-exercises",
      "meditation-timer",
      "mindfulness-practices"
    ];
  }

  /* 养生知识库 */
  wellness-knowledge: {
    cursor: pointer;
    area: [
      "seasonal-health-tips",
      "traditional-medicine",
      "health-preservation"
    ];
  }
}

/* 24. 健康饮食管理 */
.diet-management {
  /* 食材选择 */
  ingredient-selection: {
    cursor: pointer;
    area: [
      "seasonal-ingredients",
      "nutritional-values",
      "food-properties"
    ];
  }

  /* 食谱推荐 */
  recipe-recommendation: {
    cursor: pointer;
    area: [
      "healthy-recipes",
      "dietary-suggestions",
      "cooking-methods"
    ];
  }

  /* 饮食记录 */
  diet-tracking: {
    cursor: text;
    area: [
      "meal-logging",
      "water-intake",
      "dietary-notes"
    ];
  }
}

/* 25. 运动健身指导 */
.fitness-guidance {
  /* 动作示范 */
  exercise-demo: {
    cursor: help;
    area: [
      "movement-tutorials",
      "form-guidance",
      "exercise-animations"
    ];
  }

  /* 训练计划 */
  workout-plan: {
    cursor: pointer;
    area: [
      "program-selection",
      "schedule-adjustment",
      "intensity-settings"
    ];
  }

  /* 运动数据 */
  fitness-metrics: {
    cursor: crosshair;
    area: [
      "performance-tracking",
      "body-measurements",
      "fitness-progress"
    ];
  }
}

/* 26. 生活方式管理 */
.lifestyle-management {
  /* 作息规划 */
  daily-routine: {
    cursor: pointer;
    area: [
      "sleep-schedule",
      "activity-planning",
      "rest-reminders"
    ];
  }

  /* 环境建议 */
  environment-advice: {
    cursor: help;
    area: [
      "air-quality-tips",
      "living-space-guidance",
      "environmental-alerts"
    ];
  }

  /* 习惯培养 */
  habit-building: {
    cursor: pointer;
    area: [
      "habit-tracker",
      "progress-monitoring",
      "achievement-rewards"
    ];
  }
}

/* 27. 中医养生功能 */
.tcm-wellness {
  /* 经络穴位图 */
  meridian-point: {
    cursor: help;
    area: [
      "acupoint-map",
      "meridian-lines",
      "point-details"
    ];
  }

  /* 穴位按摩指导 */
  massage-guide: {
    cursor: pointer;
    active: progress;
    area: [
      "massage-tutorials",
      "pressure-points",
      "technique-demos"
    ];
  }

  /* 养生功法 */
  wellness-practice: {
    cursor: move;
    active: grabbing;
    area: [
      "qigong-movements",
      "breathing-exercises",
      "meditation-poses"
    ];
  }
}

/* 28. 智能饮食指导 */
.smart-diet {
  /* 食材选择器 */
  food-selector: {
    cursor: pointer;
    area: [
      "ingredient-browser",
      "nutrition-info",
      "seasonal-foods"
    ];
  }

  /* 营养分析 */
  nutrition-analysis: {
    cursor: help;
    area: [
      "nutrient-breakdown",
      "dietary-advice",
      "balance-indicator"
    ];
  }

  /* 食谱编辑 */
  recipe-editor: {
    cursor: text;
    active: progress;
    area: [
      "recipe-input",
      "portion-calculator",
      "cooking-notes"
    ];
  }
}

/* 29. 运动训练系统 */
.fitness-system {
  /* 动作纠正 */
  posture-correction: {
    cursor: crosshair;
    area: [
      "form-analysis",
      "alignment-guide",
      "correction-tips"
    ];
  }

  /* 训练强度 */
  training-intensity: {
    cursor: col-resize;
    area: [
      "intensity-slider",
      "effort-gauge",
      "recovery-monitor"
    ];
  }

  /* 训练计划编辑 */
  plan-editor: {
    cursor: move;
    active: grabbing;
    area: [
      "schedule-blocks",
      "exercise-arrangement",
      "rest-periods"
    ];
  }
}

/* 30. 生活节律管理 */
.lifestyle-rhythm {
  /* 作息时间 */
  daily-schedule: {
    cursor: pointer;
    area: [
      "time-blocks",
      "routine-setup",
      "reminder-settings"
    ];
  }

  /* 睡眠管理 */
  sleep-management: {
    cursor: help;
    area: [
      "sleep-tracker",
      "rest-quality",
      "circadian-rhythm"
    ];
  }

  /* 季节养生 */
  seasonal-wellness: {
    cursor: pointer;
    area: [
      "season-tips",
      "weather-advice",
      "adaptation-guide"
    ];
  }
}

/* 31. 中医经络指导 */
.meridian-guidance {
  /* 穴位定位 */
  acupoint-location: {
    cursor: crosshair;
    area: [
      "point-markers",
      "meridian-paths",
      "body-map"
    ];
  }

  /* 经络走向 */
  meridian-flow: {
    cursor: help;
    area: [
      "flow-direction",
      "channel-connections",
      "energy-paths"
    ];
  }

  /* 穴位按摩 */
  acupoint-massage: {
    cursor: pointer;
    active: progress;
    area: [
      "pressure-points",
      "massage-intensity",
      "technique-guide"
    ];
  }
}

/* 32. 营养膳食规划 */
.nutrition-planning {
  /* 食材组合 */
  food-combination: {
    cursor: move;
    active: grabbing;
    area: [
      "ingredient-matching",
      "nutrition-balance",
      "meal-planning"
    ];
  }

  /* 营养计算 */
  nutrition-calculator: {
    cursor: text;
    area: [
      "calorie-input",
      "nutrient-ratio",
      "portion-size"
    ];
  }

  /* 食谱定制 */
  recipe-customization: {
    cursor: pointer;
    area: [
      "preference-settings",
      "dietary-restrictions",
      "cooking-methods"
    ];
  }
}

/* 33. 运动康复指导 */
.rehabilitation-guide {
  /* 动作矫正 */
  movement-correction: {
    cursor: help;
    area: [
      "posture-guidance",
      "movement-analysis",
      "correction-tips"
    ];
  }

  /* 训练进度 */
  training-progress: {
    cursor: pointer;
    area: [
      "progress-tracking",
      "milestone-markers",
      "achievement-records"
    ];
  }

  /* 康复评估 */
  recovery-assessment: {
    cursor: crosshair;
    area: [
      "body-assessment",
      "flexibility-test",
      "strength-measurement"
    ];
  }
}

/* 34. 生活起居建议 */
.lifestyle-advice {
  /* 作息调整 */
  routine-adjustment: {
    cursor: col-resize;
    area: [
      "schedule-slider",
      "time-blocks",
      "activity-arrangement"
    ];
  }

  /* 环境优化 */
  environment-optimization: {
    cursor: help;
    area: [
      "living-space",
      "light-adjustment",
      "air-quality"
    ];
  }

  /* 习惯记录 */
  habit-tracking: {
    cursor: text;
    area: [
      "daily-log",
      "habit-checklist",
      "progress-notes"
    ];
  }
}

/* 35. 可访问性增强 */
.accessibility-enhancement {
  /* 高对比度模式 */
  high-contrast: {
    cursor: {
      size: "32px",
      contrast: "high",
      outline: "2px solid #000000"
    },
    area: [
      "text-content",
      "navigation-elements",
      "interactive-components"
    ];
  }

  /* 放大镜功能 */
  magnifier: {
    cursor: zoom-in;
    active: zoom-out;
    area: [
      "readable-content",
      "image-details",
      "data-visualization"
    ];
  }

  /* 辅助提示 */
  assistance: {
    cursor: help;
    area: [
      "help-tooltips",
      "feature-guides",
      "instruction-hints"
    ];
  }
}

/* 36. 跨平台适配 */
.platform-adaptation {
  /* 触屏设备 */
  touch-device: {
    cursor: pointer;
    area: [
      "touch-targets",
      "gesture-areas",
      "interactive-elements"
    ];
  }

  /* iPad适配 */
  ipad-support: {
    cursor: default;
    text-mode: text;
    area: [
      "text-inputs",
      "selection-areas",
      "editable-content"
    ];
  }

  /* 桌面设备 */
  desktop: {
    cursor: default;
    area: [
      "precision-controls",
      "hover-elements",
      "detailed-interactions"
    ];
  }
}

/* 37. 性能优化 */
.performance-optimization {
  /* 图标尺寸限制 */
  icon-size-limit: {
    max-size: "32px",
    format: ["png", "svg-static"],
    area: [
      "custom-cursors",
      "interactive-icons",
      "status-indicators"
    ];
  }

  /* 动画优化 */
  animation-optimization: {
    cursor: progress;
    performance: "high",
    area: [
      "loading-states",
      "transition-effects",
      "progress-indicators"
    ];
  }
}

/* 38. 可访问性增强 */
.accessibility {
  /* 高对比度模式 */
  high-contrast: {
    cursor: {
      size: "32px",
      contrast-ratio: "4.5:1",
      outline: "2px solid #000"
    },
    area: [
      "text-content",
      "interactive-elements",
      "navigation-components"
    ];
  }

  /* 键盘导航 */
  keyboard-navigation: {
    cursor: pointer;
    focus-visible: true;
    area: [
      "clickable-elements", 
      "form-controls",
      "menu-items"
    ];
  }

  /* 屏幕阅读器支持 */
  screen-reader: {
    cursor: help;
    aria-label: required;
    area: [
      "content-descriptions",
      "action-hints",
      "status-updates"
    ];
  }
}

/* 39. 响应式交互 */
.responsive-interaction {
  /* 触屏设备 */
  touch-device: {
    cursor: pointer;
    touch-action: manipulation;
    area: [
      "tap-targets",
      "swipe-areas",
      "touch-controls"
    ];
  }

  /* 手势控制 */
  gesture-control: {
    cursor: move;
    active: grabbing;
    area: [
      "drag-elements",
      "zoom-controls",
      "rotation-handles"
    ];
  }
}

/* 40. 性能优化 */
.performance {
  /* 动画优化 */
  animation: {
    cursor: progress;
    performance: {
      will-change: "transform",
      gpu-acceleration: true
    },
    area: [
      "loading-states",
      "transitions",
      "progress-indicators"
    ];
  }

  /* 资源加载 */
  resource-loading: {
    cursor: wait;
    lazy-loading: true;
    area: [
      "images",
      "media-content",
      "dynamic-components"
    ];
  }
}

# AI 辅助开发规则配置
# 用于自动检测和修复开发过程中的问题

/* 1. 代码质量规则 */
.code-quality {
  /* 自动格式化 */
  auto-format: {
    enabled: true;
    rules: {
      indentation: 2;
      max-line-length: 100;
      semicolons: true;
      quotes: "single";
    }
  }

  /* 类型检查 */
  type-checking: {
    enabled: true;
    strict-mode: true;
    auto-fix: {
      missing-types: true;
      implicit-any: true;
      strict-null-checks: true;
    }
  }

  /* 命名规范 */
  naming: {
    auto-correct: true;
    conventions: {
      components: "PascalCase";
      functions: "camelCase";
      variables: "camelCase";
      constants: "UPPER_CASE";
    }
  }
}

/* 2. 错误处理规则 */
.error-handling {
  /* 自动错误处理 */
  auto-error-handling: {
    enabled: true;
    patterns: {
      async-functions: true;
      promises: true;
      type-assertions: true;
    }
  }

  /* 错误报告 */
  error-reporting: {
    collect-stack-trace: true;
    log-to-console: true;
    send-to-monitoring: true;
  }
}

/* 3. 性能优化规则 */
.performance-rules {
  /* 优化建议 */
  optimization-suggestions: {
    enabled: true;
    checks: {
      memoization: true;
      lazy-loading: true;
      code-reuse: true;
    }
  }

  /* 性能监控 */
  monitoring: {
    enabled: true;
    metrics: {
      response-time: true;
      memory-usage: true;
      cpu-usage: true;
    }
  }
}

/* 4. 代码重构规则 */
.refactoring {
  /* 自动重构 */
  auto-refactor: {
    enabled: true;
    suggestions: {
      unused-code: true;
      duplicate-code: true;
      complexity-reduction: true;
    }
  }

  /* 模式识别 */
  pattern-recognition: {
    design-patterns: true;
    anti-patterns: true;
    suggest-improvements: true;
  }
}

/* 5. 测试规则 */
.testing {
  /* 自动生成测试 */
  auto-generate-tests: {
    enabled: true;
    coverage: {
      statements: 80;
      branches: 70;
      functions: 80;
      lines: 80;
    }
  }

  /* 测试质量 */
  test-quality: {
    check-test-names: true;
    enforce-assertions: true;
    check-mock-usage: true;
  }
}

/* 6. 文档规则 */
.documentation {
  /* 自动文档 */
  auto-document: {
    enabled: true;
    generate-for: {
      functions: true;
      classes: true;
      interfaces: true;
      components: true;
    }
  }

  /* 注释规范 */
  comments: {
    require-jsdoc: true;
    enforce-format: true;
    check-spelling: true;
  }
}

/* 7. 安全规则 */
.security {
  /* 安全检查 */
  security-checks: {
    enabled: true;
    checks: {
      xss: true;
      injection: true;
      authentication: true;
    }
  }

  /* 自动修复 */
  auto-fix: {
    sanitize-input: true;
    escape-output: true;
    validate-tokens: true;
  }
}

/* 8. 版本控制规则 */
.version-control {
  /* 提交检查 */
  commit-checks: {
    enabled: true;
    rules: {
      conventional-commits: true;
      linked-issues: true;
      no-conflicts: true;
    }
  }

  /* 分支管理 */
  branch-management: {
    enforce-naming: true;
    prevent-direct-master: true;
    require-reviews: true;
  }
}

/* 9. 依赖管理规则 */
.dependencies {
  /* 依赖检查 */
  dependency-checks: {
    enabled: true;
    checks: {
      vulnerabilities: true;
      outdated-packages: true;
      unused-dependencies: true;
    }
  }

  /* 自动更新 */
  auto-update: {
    enabled: true;
    semver-level: "patch";
    create-pull-request: true;
  }
}

/* 10. 自动修复规则 */
.auto-fix {
  /* 常见问题修复 */
  common-issues: {
    enabled: true;
    fixes: {
      syntax-errors: true;
      import-errors: true;
      type-errors: true;
    }
  }

  /* 代码优化 */
  code-optimization: {
    enabled: true;
    optimizations: {
      dead-code: true;
      unused-imports: true;
      format-code: true;
    }
  }
}

/* 11. AI 辅助规则执行器 */
.ai-rule-engine {
  /* 规则应用 */
  apply-rules: {
    enabled: true;
    auto-fix: true;
    report-violations: true;
  }

  /* 实时检查 */
  real-time-check: {
    enabled: true;
    highlight-issues: true;
    suggest-fixes: true;
  }

  /* 优化建议 */
  optimization-suggestions: {
    enabled: true;
    show-inline: true;
    create-tasks: true;
  }
}

/* 调试控制台配置规则 */
.debug-console {
  /* 1. 基础调试配置 */
  basic-debug: {
    /* 断点设置 */
    breakpoints: {
      enabled: true;
      highlight-color: "#ff0000";
      types: [
        "line-breakpoint",
        "conditional-breakpoint",
        "data-breakpoint"
      ];
    }

    /* 调试信息输出 */
    console-output: {
      log-levels: [
        "error",
        "warn",
        "info",
        "debug",
        "trace"
      ];
      format: {
        timestamp: true;
        source-line: true;
        stack-trace: true;
      }
    }
  }

  /* 2. 变量监控 */
  variable-watch: {
    /* 变量追踪 */
    watch-expressions: {
      enabled: true;
      auto-refresh: true;
      highlight-changes: true;
    }

    /* 作用域查看 */
    scope-inspection: {
      local-variables: true;
      closure-variables: true;
      global-objects: true;
    }
  }

  /* 3. 调用栈分析 */
  call-stack: {
    /* 栈追踪 */
    stack-trace: {
      depth: "full";
      async-calls: true;
      framework-calls: true;
    }

    /* 性能分析 */
    performance-profiling: {
      enabled: true;
      sampling-rate: 100;
      timeline-view: true;
    }
  }
}
batchfile
css
dockerfile
express.js
golang
javascript
less
powershell
+6 more

First seen in:

Justinfoxs2023/Health

Used in 1 repository

TypeScript
This is a NodeJS docker container. This is a simple and small user base app. Simplecity will be the core of everything

The .appLogic/ folder has Markdown notes of may plans for this app.
  - Keep the .appLogic/ fresh in your mind as you write the code.
  - Read this as needed only edit the .appLogic/ files when users request changes.
  - use these as supplementary instruction for you to follow. 

## Coding style
  - write one line comments to make it easy for me to read your code.
  - keep the code clean and readable.
  - keep the code minimal and simple.
  - setup good logging levels along the way.
  - use easy to understand function names.

## Guide lines for your actions. 

### Adding new features
  - prioritize using the built in libraries and frameworks.
  - ask user to use `npm install ...` to install dependencies. avoid adding dependencies directly to the package.json file.

### Debugging
  - Do not jump to changing the code.
  - Make a  task specific file in the .cursor/ folder and in this file 
    * write down your thoughts and ideas.
    * give a few option to the user to choose from.
    * explain the pros and cons of each option.
  - Always wait for the user to explicitly tell you to change the code.
  - Always first perpose changes in a  file in the .cursor/ folder.
  - The user will clean up this dir when tasks are complete.

This is a very simple project lets keep the code simple and to the point.
Use simple and basic libraries and frameworks.
css
docker
dockerfile
golang
html
npm
typescript

First seen in:

taoi11/caf-gpt

Used in 1 repository

Python
# .cursorrules
# Custom rules for AI assistance in a multimodal retrieval project

You are an AI assistant specialized in multimodal data extraction and retrieval systems. Your role is to assist in developing a project that utilizes the "Unstructured" tool for extracting content from various file types and processing them for retrieval purposes.

## Project Overview
- **Objective**: Develop a system capable of extracting images, tables, and text from documents, generating summaries, creating embeddings, and enabling efficient retrieval based on user queries.
- **Tools and Technologies**:
  - **Extraction**: "Unstructured" tool
  - **Processing**: Large Language Models (LLMs) for summary generation
  - **Embedding**: EmbeddingModel for vectorization
  - **Storage**: Vector databases and document stores
  - **Query Handling**: VectorSearch for matching user queries with relevant content

## Guidelines
1. **Extraction**:
   - **Images**: Extract images from PDF and image files, saving them in the `images/` directory.
   - **Tables**: Extract tables from PDF and Excel files, storing them in the `tables/` directory.
   - **Text**: Extract textual content from PDF and TXT files, placing them in the `texts/` directory.

2. **Processing**:
   - **Summary Generation**: Utilize LLMs to create concise summaries for all extracted content types, saving these summaries in the `summaries/` directory.
   - **Embedding Generation**: Use the EmbeddingModel to generate embeddings from text summaries, storing them in the `vector_db/` directory.

3. **Storage**:
   - **Document IDs**: Maintain a document store that links summaries and embeddings to their respective document IDs, facilitating efficient retrieval.

4. **Query Handling**:
   - **User Queries**: Implement a system that processes user queries, retrieves relevant documents and summaries based on embeddings, and presents the results from the `query_results/` directory.

## Coding Standards
- **Language**: Python 3.10+
- **Style Guide**: Adhere to PEP 8 standards.
- **Version Control**: Use Git for version control, with clear and descriptive commit messages.

## Best Practices
- **Modular Code**: Write modular and reusable code components.
- **Error Handling**: Implement robust error handling and logging mechanisms.
- **Documentation**: Provide clear docstrings for all functions and maintain an up-to-date README.md file.

## Performance Optimization
- **Lazy Loading**: Implement lazy loading for non-critical components to enhance performance.
- **Resource Management**: Optimize the use of computational resources during extraction and processing stages.

## Testing
- **Unit Tests**: Develop unit tests for all major functions using a framework like pytest.
- **Integration Tests**: Ensure that different components of the system work seamlessly together through integration testing.

## Security
- **Data Privacy**: Handle all data in compliance with relevant data privacy regulations.
- **Access Control**: Implement appropriate access controls to secure sensitive information.

less
python

First seen in:

flight505/Multimodal_RAG

Used in 1 repository

TypeScript
# .cursorrules Prompt for Dropfarm Application Development

You are an expert AI assistant with 20 years of experience in software development being the main developer to develop and improve the Dropfarm application, a scalable, headless automation system for web interactions. Your role is to provide guidance, code suggestions, and best practices aligned with the following architecture and goals. The automation software is a python script that interacts with chrome and telegram, where it interacts with a telegram chat bot, which opens a  web application that the python script can interact with. The end goal is to farm airdrop tokens, that new crypto porjects drop through these telegram apps. We want to automate this process and make it easy to add new airdrop projects later on and have a system that is easy to maintain (For now we will have three main routines which we want to farm: GOATS, 1Win and PX).

From previous builds that run on Ubuntu 20.04, I will give you the main project files and this is the old structure:

/root
    /dropfarm
        /bot
            /assets (goats, onewin, px folder and in their respective folders are assets of the UI for image recognition)
            /utils (app_launcher.py, helpers.py)
            /routines (goats.py, onewin.py, px.py)
        /.venv
            /some environment files
    /

This information is just for you to understand how everything worked before, when I copy the single files into the project dir here, you need to analyze and understand their functionality in the old structure and use this information to take the steps below here and rebuild the project with the new scope written down below here:

A mini summary of what the user should be able to do:

The user connects to a website and logs in. The dashboard shows active status of the python script, a start and stop button for the bot, settings for the bots to choose different routines and timings etc. The user also has the ability to select which airdrop project they want to farm. The user also has the ability to see the earnings of the airdrop projects in a nice bento card ddesign and also a graph with close to real-time data because we dont see the bot itneracting in real-time and need reporting and data to know if everything works. The user also has the ability to see the settings of the bots. All this we wasnt to build in a headless environment and this is why we need to change the current approach that is heavily relying on image recognition.

And the tech with how we are gonna achieve that:

## System Architecture

### 1. Client Side (Next.js and shadcn/ui)
- Implement Next.js for server-side rendering and routing
- Utilize shadcn/ui components for rapid UI development
- Develop responsive and accessible React components
- Implement client-side state management (React Context or similar)
- Use Axios or SWR for efficient API requests

### 2. Server Side
#### 2.1 Flask API Server
- Develop RESTful API endpoints for all necessary operations
- Implement JWT authentication for secure user sessions
- Handle business logic and data validation

#### 2.2 PostgreSQL Database
- Design efficient schema for storing user data, bot configurations, and logs
- Implement database migrations for version control
- Optimize queries for performance

#### 2.3 Redis Task Queue
- Set up Redis as a message broker for task distribution
- Implement task prioritization and scheduling

#### 2.4 Celery Task Manager
- Configure Celery for distributed task execution
- Implement error handling and task retrying mechanisms
- Develop task result storage and retrieval system

#### 2.5 Bot Workers (Headless Selenium)
- Implement headless Selenium instances for web automation
- Develop modular and reusable automation scripts
- Implement robust error handling and recovery mechanisms

#### 2.6 Logging and Monitoring
- Replace all print statements with proper logging using the logging module.
- Implement structured logging for better searchability and analysis.
- Suggest appropriate log levels  (DEBUG, INFO, WARNING, ERROR, CRITICAL) and develop warnings for different scenarios.

## Key Development Areas

### 1. Security
- Implement secure authentication and authorization
- Use HTTPS for all communications
- Implement rate limiting and other anti-abuse measures
- Securely manage and store sensitive information (e.g., credentials)

### 2. Scalability
- Design components for horizontal scaling
- Implement load balancing for API servers and bot workers
- Optimize database for high concurrency

### 3. User Experience
- Design intuitive and responsive dashboard interface
- Implement real-time updates for bot status and task progress
- Develop comprehensive error messages and user guidance

### 4. Testing
- Implement unit tests for all components (pytest for Python, Jest for JavaScript)
- Develop integration tests for end-to-end workflows
- Implement continuous integration (CI) for automated testing

### 5. Documentation
- Create comprehensive API documentation
- Develop user guides for dashboard operation
- Maintain up-to-date technical documentation for all components

## Coding Best Practices

1. Follow PEP 8 style guidelines for Python code
2. Adhere to React best practices and hooks usage for frontend development
3. Use type hints in Python and TypeScript for improved code quality
4. Write clear, concise docstrings and comments
5. Implement proper error handling and logging (use `logging` module, not `print`)
6. Use asynchronous programming where appropriate (`asyncio` for Python, `async/await` for JavaScript)
7. Follow SOLID principles and design patterns for maintainable code
8. Implement proper version control practices (descriptive commit messages, branching strategy)

## Development Workflow

1. Use Docker and docker-compose for consistent development and production environments
2. Implement CI/CD pipeline for automated testing and deployment
3. Follow Git Flow or a similar branching strategy for version control
4. Conduct regular code reviews to maintain code quality
5. Use feature flags for safe deployment of new features

When providing code suggestions or reviewing existing code, always consider these guidelines and propose improvements that align with this architecture. Focus on creating a scalable, maintainable, and user-friendly automation system. Prioritize functionality, security, performance, and user experience in all aspects of the development process.

## Moving forward, I want you to assure me that

1. You will always strive to provide honest, accurate, and realistic information and advice.
2. You will be upfront about potential challenges, limitations, and areas of uncertainty.
3. You will not sugarcoat issues or downplay potential problems.
4. If you're unsure about something, you will clearly state that and suggest ways to verify or investigate further.
5. You will always keep in mind the critical nature of this project to my work and livelihood.
bun
css
docker
flask
golang
java
javascript
jest
+13 more

First seen in:

desperad0s/dropfarm

Used in 1 repository

TypeScript
TypeScript
You are an expert in Next.js 15, Cloudflare Pages/Workers, Edge Runtime, TypeScript, shadcn/ui, and modern web development.

Key Principles:

Code Style and Structure
- Follow consistent code formatting using Prettier
- Use ESLint for code quality
- Organize imports logically
- Keep components small and focused 
- Use TypeScript strict mode
- Follow App Router conventions
- Implement proper middleware
- Use proper route grouping

Naming Conventions
- Use PascalCase for component names
- Use camelCase for variables and functions 
- Use SCREAMING_SNAKE_CASE for constants
- Use kebab-case for CSS classes and files
- Follow Next.js file-system based routing conventions
- Use proper naming for API routes

TypeScript Usage
- Enable strict mode in tsconfig.json
- Use proper type annotations
- Leverage interfaces and types
- Avoid any type
- Use generics when appropriate
- Implement proper Zod schemas
- Type server and client components appropriately

Next.js App Router
- Use proper route segments
- Implement parallel routes when needed
- Use intercepting routes appropriately
- Implement proper loading states
- Use error boundaries effectively
- Implement proper not-found pages
- Use proper layout nesting
- Implement proper metadata
- Use proper static/dynamic rendering
- Implement proper caching strategies

Edge Runtime
- Use proper Edge Runtime configurations
- Implement proper Edge Middleware
- Use proper Edge Caching
- Implement proper Edge Functions
- Use proper Edge KV storage
- Follow Edge Runtime limitations
- Optimize for Edge performance

Cloudflare Integration
- Use proper Cloudflare Pages configurations
- Implement proper Cloudflare Workers
- Use proper Cloudflare KV storage
- Implement proper Cloudflare R2 storage
- Use proper Cloudflare D1 database
- Follow Cloudflare deployment best practices
- Implement proper environment variables

shadcn/ui Usage
- Follow component installation guidelines
- Use proper theming system
- Implement proper dark mode
- Use proper component composition
- Customize components appropriately
- Follow accessibility guidelines
- Use proper animation system
- Implement proper form validation

State Management
- Use proper server state
- Implement proper client state
- Use React Server Components effectively
- Implement proper form state management
- Use proper data fetching patterns
- Follow caching best practices

Performance Optimization
- Use proper Image component
- Implement proper Font optimization
- Use proper Script loading
- Implement proper lazy loading
- Use proper bundle optimization
- Monitor Core Web Vitals
- Use proper partial prerendering
- Implement proper ISR strategies

Accessibility
- Follow WCAG guidelines
- Use proper ARIA labels
- Implement proper keyboard navigation
- Use proper color contrast
- Implement proper focus states
- Use proper heading hierarchy
- Follow shadcn/ui accessibility patterns

Testing
- Write unit tests with Jest/Vitest
- Write integration tests
- Write E2E tests with Playwright
- Use proper test coverage
- Implement proper CI/CD
- Test Edge functions properly
- Test Cloudflare integrations

Documentation
- Write proper documentation
- Use proper JSDoc comments
- Document API endpoints
- Document component props
- Document state management
- Document deployment procedures
- Document Edge Runtime limitations

Security
- Implement proper authentication
- Use proper authorization
- Follow CORS best practices
- Implement proper CSP
- Use proper environment variables
- Follow security headers best practices
- Implement proper rate limiting

Key Conventions
- Follow Next.js App Router conventions
- Use TypeScript for type safety
- Follow Edge Runtime best practices
- Use shadcn/ui component patterns
- Implement proper error handling
- Follow accessibility guidelines
- Write proper tests
- Write proper documentation

References:
- Next.js Documentation
- Cloudflare Pages/Workers Documentation
- Edge Runtime Documentation
- shadcn/ui Documentation
- TypeScript Documentation
- React Documentation

Use English for all documentation and comments!
Use English for all documentation and comments!
Use English for all documentation and comments!
bun
css
eslint
javascript
jest
nestjs
next.js
openai
+7 more
chenqianhe/open-dashboard

Used in 1 repository

TypeScript
You are an expert AI assistant and exceptional senior software developer with vast knowledge across multiple programming languages, frameworks, and best practices.

<system_constraints>
  You are operating in an environment DevContainer on Apple M2 Pro macOS 13.3, node.js runtime that emulates a Linux system to some degree. 
  It does come with a shell that emulates zsh. 
  The container cannot run native binaries since those cannot be executed in the browser. 
  That means it can only execute code that is native to a browser including JS, WebAssembly, etc.
  All code should be available to deploy into AWS Lambda provided by Amazon Web Service.

  The shell comes with \`python\` and \`python3\` binaries, but they are LIMITED TO THE PYTHON STANDARD LIBRARY ONLY This means:

    - There is NO \`pip\` support! If you attempt to use \`pip\`, you should explicitly state that it's not available.
    - CRITICAL: Third-party libraries cannot be installed or imported.
    - Even some standard library modules that require additional system dependencies (like \`curses\`) are not available.
    - Only modules from the core Python standard library can be used.

  Keep these limitations in mind when suggesting Python or C++ solutions and explicitly mention these constraints if relevant to the task at hand.
  DevContainer has the ability to run a web server but requires to use an npm package (e.g., Vite, servor, serve, http-server) or use the Node.js APIs to implement a web server.

  IMPORTANT: Prefer using Japanese instead of english, when you respond message.
  IMPORTANT: Prefer writing Node.js scripts instead of shell scripts. The environment doesn't fully support shell scripts, so use Node.js for scripting tasks whenever possible!
  IMPORTANT: When choosing databases or npm packages, prefer options that don't rely on native binaries. For databases, prefer libsql, sqlite, or other solutions that don't involve native code. WebContainer CANNOT execute arbitrary native binaries.
  IMPORTANT: Prefer using Vite instead of implementing a custom web server.

  Available shell commands: cat, chmod, cp, echo, hostname, kill, ln, ls, mkdir, mv, ps, pwd, rm, rmdir, xxd, alias, cd, clear, curl, env, false, getconf, head, sort, tail, touch, true, uptime, which, code, jq, loadenv, node, python3, wasm, xdg-open, command, exit, export, source
</system_constraints>

<code_formatting_info>
  Use 2 spaces for code indentation
</code_formatting_info>

<message_formatting_info>
  You can make the output pretty by using only the following available HTML elements: ${allowedHTMLElements.map((tagName) => `<${tagName}>`).join(', ')}
</message_formatting_info>

<diff_spec>
  For user-made file modifications, a \`<${MODIFICATIONS_TAG_NAME}>\` section will appear at the start of the user message. It will contain either \`<diff>\` or \`<file>\` elements for each modified file:

    - \`<diff path="/some/file/path.ext">\`: Contains GNU unified diff format changes
    - \`<file path="/some/file/path.ext">\`: Contains the full new content of the file

  The system chooses \`<file>\` if the diff exceeds the new content size, otherwise \`<diff>\`.

  GNU unified diff format structure:

    - For diffs the header with original and modified file names is omitted!
    - Changed sections start with @@ -X,Y +A,B @@ where:
      - X: Original file starting line
      - Y: Original file line count
      - A: Modified file starting line
      - B: Modified file line count
    - (-) lines: Removed from original
    - (+) lines: Added in modified version
    - Unmarked lines: Unchanged context

  Example:

  <${MODIFICATIONS_TAG_NAME}>
    <diff path="/home/project/src/main.js">
      @@ -2,7 +2,10 @@
        return a + b;
      }

      -console.log('Hello, World!');
      +console.log('Hello, Guys!');
      +
      function greet() {
      -  return 'Greetings!';
      +  return 'Greetings!!';
      }
      +
      +console.log('The End');
    </diff>
    <file path="/home/project/package.json">
      // full file content here
    </file>
  </${MODIFICATIONS_TAG_NAME}>
</diff_spec>

<examples>
  <example>
    <user_query>Can you help me create a JavaScript function to calculate the factorial of a number?</user_query>
    <assistant_response>
      Certainly, I can help you create a JavaScript function to calculate the factorial of a number.

      ```shell
      cat <<EOF > index.js
        function factorial(n) {
            ...
        }

            ...
      EOF
      node index.js
      ```

    </assistant_response>
  </example>
</examples>
aws
css
java
javascript
npm
python
sqlite
typescript
+1 more

First seen in:

Eigo-Mt-Fuji/genai-app

Used in 1 repository

PowerShell
{
  "repositoryPurpose": "Automate the setup of a Windows 10 laptop with WSL Ubuntu for development and DevOps tasks.",
  "primaryGoals": [
    "Provide dynamic installation scripts for GUI applications and CLI tools using Winget and Scoop in both PowerShell and Nushell.",
    "Support multiple shells (PowerShell and Nushell) for a flexible development environment.",
    "Enable reproducible WSL Ubuntu environments using Devbox as the primary package manager for system-wide tools.",
    "Simplify dotfile management with GNU Stow for consistent configuration replication across environments."
  ],
  "scriptGuidelines": {
    "scripts/windows": {
      "description": "Contains scripts for installing GUI applications (Winget) and CLI tools (Scoop) interactively using Gum.",
      "scripts": [
        {
          "name": "winget.ps1",
          "description": "A PowerShell script to dynamically install GUI applications using Winget.",
          "features": [
            "Interactive application selection with Gum.",
            "Idempotency to skip already-installed applications.",
            "Silent installations with necessary agreements accepted."
          ]
        },
        {
          "name": "winget.nu",
          "description": "A Nushell script to dynamically install GUI applications using Winget.",
          "features": [
            "Leverages Nushell’s structured data pipelines for concise scripting.",
            "Interactive application selection with Gum.",
            "Idempotent behavior to avoid redundant installations."
          ]
        },
        {
          "name": "scoop.ps1",
          "description": "A PowerShell script to dynamically install CLI tools using Scoop.",
          "features": [
            "Interactive tool selection with Gum.",
            "Ensures tools are only installed once.",
            "Works seamlessly in Windows PowerShell and PowerShell 7+."
          ]
        },
        {
          "name": "scoop.nu",
          "description": "A Nushell script to dynamically install CLI tools using Scoop.",
          "features": [
            "Uses Nushell's structured data model for concise scripting.",
            "Interactive tool selection with Gum.",
            "Idempotency to skip already-installed tools."
          ]
        }
      ]
    },
    "scripts/ubuntu": {
      "description": "Contains scripts for setting up WSL Ubuntu environments using Devbox.",
      "scripts": [
        {
          "name": "dynamic-devbox.nu",
          "description": "A Nushell script to dynamically install global tools in WSL Ubuntu using Devbox.",
          "features": [
            "Interactive package selection using Gum.",
            "Uses Devbox for reproducible and isolated installations.",
            "Supports installation of Rust tools, utilities, and other packages essential for development."
          ]
        },
        {
          "name": "dynamic-devbox.ps1",
          "description": "A PowerShell script to dynamically install global tools in WSL Ubuntu using Devbox.",
          "features": [
            "Interactive package selection using Gum.",
            "Uses Devbox for reproducible and isolated installations.",
            "Focuses on compatibility with WSL Ubuntu through PowerShell."
          ]
        }
      ]
    }
  },
  "documentationGuidelines": {
    "readmeStructure": [
      "Purpose of the repository and target audience.",
      "Overview of setup steps: Windows applications, WSL Ubuntu setup, and dotfiles.",
      "Prerequisites for running the scripts.",
      "Detailed usage instructions for each script.",
      "Next steps and planned enhancements."
    ],
    "nextUpdates": [
      "Include detailed instructions for using Devbox to set up WSL Ubuntu environments.",
      "Document GNU Stow usage for managing dotfiles.",
      "Add testing instructions for all scripts.",
      "Provide a comparison between PowerShell and Nushell script usage for Windows tasks."
    ]
  },
  "bestPractices": [
    "Ensure all scripts are idempotent to avoid redundant installations.",
    "Use Gum for all interactive selections to provide a consistent user experience.",
    "Maintain compatibility with both PowerShell and Nushell wherever possible.",
    "Keep documentation clear, concise, and beginner-friendly.",
    "Provide fallback instructions for manual installations if automation fails."
  ]
}

bun
golang
less
nushell
powershell
rust
journeyman33/win10-wsl-ubuntu-setup

Used in 1 repository

JavaScript
# Global Rules for Next.js Project

# Code Style
max_line_length = 80
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# JavaScript/JSX
jsx_quotes = double
semi = true
trailing_comma = es5
arrow_parens = always
bracket_spacing = true
jsx_bracket_same_line = false

# Component Structure
component_directory = src/app/components
styles_directory = src/app/styles
utils_directory = src/app/utils
hooks_directory = src/app/hooks
contexts_directory = src/app/contexts

# Naming Conventions
component_naming = PascalCase
function_naming = camelCase
variable_naming = camelCase
constant_naming = UPPER_SNAKE_CASE
file_naming = kebab-case

# Import Order
import_order = [
  "^react",
  "^next",
  "^@/components",
  "^@/styles",
  "^@/utils",
  "^@/hooks",
  "^@/contexts",
  "^[./]"
]

# Performance
enable_code_splitting = true
enable_lazy_loading = true
enable_image_optimization = true

# Accessibility
enforce_aria_labels = true
enforce_semantic_html = true
enforce_keyboard_navigation = true

# Documentation
require_component_documentation = true
require_function_documentation = true
require_prop_types = true

# Testing
require_unit_tests = true
require_integration_tests = true
test_coverage_threshold = 80

# State Management
prefer_hooks = true
prefer_context = true
prefer_redux = false

# CSS
prefer_vanilla_css = true
css_modules = false
css_in_js = false
tailwind = false

# Build
enable_minification = true
enable_tree_shaking = true
enable_source_maps = true

# Dependencies
package_manager = bun
node_version = ">=18.0.0"
bun
css
java
javascript
next.js
react
redux
scss
+3 more
ReginaldBrixton/capstone-compass

Used in 1 repository

Python
<?xml version='1.0' encoding='utf-8'?>
<project-rules>
  <code-rules>
    <file-documentation>
      <file-level-docstring>
        """

        {Clear one-line statement of this file's purpose}

        Key Components:

        {ClassName}: {What this class does and why it exists}

        {function_name}(): {What this function does and why it's needed}

        File Dependencies:

        This file uses: {OtherComponent}: {Why it's used}

        This file is used by: {OtherComponent}: {Why it's needed}

        """</file-level-docstring>
    <example>
        ```python

        """

        Manages XML documentation updates for project structure.

        Key Components:

        XMLManager: Handles reading and writing of .cursorrules XML file

        update_rules(): Updates documentation while preserving existing rules

        File Dependencies:

        This file uses: ProjectScanner: To get current project structure

        This file is used by: CLI: To execute documentation updates

        """

        class XMLManager:

        ...

        ```</example>
    </file-documentation>
  <documentation-maintenance>
      <llm-instructions>
        Before modifying ANY file, you MUST:

        1. Read the current file-level docstring

        2. Decide if your changes affect the documentation

        3. Output your decision in this format:

        Documentation Decision:

        - Update Required: Yes/No

        - Reason: One clear sentence explaining why/why not

        - Changes Needed: [If Yes] What needs to be updated

        Actions Taken:

        -If "Yes" above, include the docstring edits in your file edits</llm-instructions>
    <update-triggers>
        Check if your changes involve:

        - File's main purpose changing

        - New/modified classes or functions

        - Changes to what this file uses

        - Changes to what uses this file</update-triggers>
    </documentation-maintenance>
  <workflow>
      <steps>
        1. READ current file-level docstring

        2. OUTPUT documentation decision

        3. MAKE code changes

        4. UPDATE docstring if needed</steps>
    </workflow>
  </code-rules>
<project-map>
    <structure>
      <directory name="src">
        <directory name="project_mapper">
          <file name="template_manager.py">
            <purpose>
              Template management for project-mapper.

              Key Components:

              TemplateManager: Handles template submodule setup and selection

              setup_templates(): Guides user through template setup process

              Project Dependencies:

              This file uses: git: For submodule operations

              This file is used by: CLI: For template initialization</purpose>
          </file>
        <file name="cli.py">
            <purpose>
              Command line interface for project-mapper.

              Key Components:

              main(): CLI entry point handling template setup and project scanning.

              Project Dependencies:

              This file uses:

              - TemplateManager: For template setup and selection

              - XMLManager: For documentation updates

              - PythonScanner: For Python file scanning</purpose>
          </file>
        <directory name="core">
            <file name="scanner.py">
              <purpose>
                Core scanning functionality for project documentation.</purpose>
            </file>
          <file name="xml_manager.py">
              <purpose>
                XML management for project documentation.

                Key Components:

                XMLManager: Handles reading, writing, and merging of XML templates and .cursorrules

                _merge_templates(): Merges multiple XML templates while respecting inheritance

                _load_template(): Loads and validates XML templates

                Project Dependencies:

                This file uses:

                - ElementTree: For XML parsing and manipulation

                - Path: For file path handling

                This file is used by: CLI: For template management and documentation updates</purpose>
            </file>
          </directory>
        <directory name="adapters">
            <file name="base.py">
              <purpose>
                Abstract base adapter interface for language-specific scanners.</purpose>
            </file>
          <directory name="python">
              <file name="scanner.py">
                <purpose>
                  Python-specific implementation of project scanner.</purpose>
              </file>
            </directory>
          </directory>
        <directory name="git">
            <file name="hooks.py">
              <purpose>
                Git hook management for project-mapper.</purpose>
            </file>
          </directory>
        </directory>
      </directory>
    </structure>
  <relationships>
      <flow description="Project documentation flow">
        Documentation maintained by LLM based on code analysis</flow>
    </relationships>
  </project-map>
</project-rules>
python
shell

First seen in:

blakesims/project-mapper

Used in 1 repository