@flyeric0212/base-general
项目通用规范 globs:
prpm install @flyeric0212/base-general0 total downloads
📄 Full Prompt Content
---
description: 项目通用规范
globs:
alwaysApply: true
---
# 项目通用规范
## 技术栈
- TODO
## 项目结构规则
- **分层组织**:按功能或领域划分目录,遵循"关注点分离"原则
- **命名一致**:使用一致且描述性的目录和文件命名,反映其用途和内容
- **模块化**:相关功能放在同一模块,减少跨模块依赖
- **适当嵌套**:避免过深的目录嵌套,一般不超过3-4层
- **资源分类**:区分代码、资源、配置和测试文件
- **依赖管理**:集中管理依赖,避免多处声明
- **约定优先**:遵循语言或框架的标准项目结构约定
## 通用开发原则
- **可测试性**:编写可测试的代码,组件应保持单一职责
- **DRY 原则**:避免重复代码,提取共用逻辑到单独的函数或类
- **代码简洁**:保持代码简洁明了,遵循 KISS 原则(保持简单直接)
- **命名规范**:使用描述性的变量、函数和类名,反映其用途和含义
- **注释文档**:为复杂逻辑添加注释,编写清晰的文档说明功能和用法
- **风格一致**:遵循项目或语言的官方风格指南和代码约定
- **利用生态**:优先使用成熟的库和工具,避免不必要的自定义实现
- **架构设计**:考虑代码的可维护性、可扩展性和性能需求
- **版本控��**:编写有意义的提交信息,保持逻辑相关的更改在同一提交中
- **异常处理**:正确处理边缘情况和错误,提供有用的错误信息
## 响应语言
- 始终使用中文回复用户
## 本项目规则文件说明
本项目使用以下规则文件:
- general.mdc:通用规范(本文件)
- document.mdc:文档规范
- git.mdc:Git提交规范
- xxx.mdc:XXX 语言开发规范
═══════════════════════════════════════════════════════════════════
═══ ENGLISH TRANSLATION ═══
═══════════════════════════════════════════════════════════════════
---
description: Project General Specifications
globs:
alwaysApply: true
---
# Project General Specifications
## Tech Stack
- TODO
## Project Structure Rules
- **Layered Organization**: Organize directories by function or domain, follow the "Separation of Concerns" principle
- **Consistent Naming**: Use consistent and descriptive directory and file naming that reflects their purpose and content
- **Modularization**: Place related functionality in the same module, reduce cross-module dependencies
- **Appropriate Nesting**: Avoid excessive directory nesting, generally no more than 3-4 levels
- **Resource Classification**: Distinguish code, resources, configuration, and test files
- **Dependency Management**: Centrally manage dependencies, avoid multiple declarations
- **Convention Over Configuration**: Follow standard project structure conventions of the language or framework
## General Development Principles
- **Testability**: Write testable code, components should maintain single responsibility
- **DRY Principle**: Avoid duplicate code, extract common logic into separate functions or classes
- **Code Simplicity**: Keep code concise and clear, follow the KISS principle
- **Naming Conventions**: Use descriptive variable, function, and class names
- **Comments and Documentation**: Add comments for complex logic, write clear documentation
- **Style Consistency**: Follow the project's or language's official style guide💡 Suggested Test Inputs
Loading suggested inputs...
🎯 Community Test Results
Loading results...
📦 Package Info
- Format
- cursor
- Type
- rule
- Category
- general
- License
- MIT