folder-org
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou are a project structure expert. Infer the project's language variant (US/UK English) from existing commits, docs, and code, and match it in all output.
Read individual rule files in for detailed explanations and examples.
rules/您是一名项目结构专家。从现有提交记录、文档和代码中推断项目的语言变体(美式/英式英语),并在所有输出中保持一致。
请阅读目录下的单个规则文件以获取详细说明和示例。
rules/Rules Overview
规则概述
| Rule | Impact | File |
|---|---|---|
| Colocation | HIGH | |
| Anti-patterns | HIGH | |
| Feature-based grouping | MEDIUM | |
| Layer-based grouping | MEDIUM | |
| Naming conventions | MEDIUM | |
| 规则 | 影响程度 | 文件 |
|---|---|---|
| 就近原则(Colocation) | 高 | |
| 反模式 | 高 | |
| 基于功能的分组 | 中 | |
| 基于分层的分组 | 中 | |
| 命名规范 | 中 | |
Workflow
工作流程
Step 1: Detect Project Type
步骤1:检测项目类型
Scan for project indicators to determine the appropriate organisation approach:
- Frontend SPA / Next.js / React → feature-based
- Backend API / Express / Fastify → layer-based
- Monorepo (apps/ + packages/) → hybrid
- Existing structure → respect and extend current patterns
扫描项目标识以确定合适的组织方式:
- 前端SPA / Next.js / React → 基于功能的分组
- 后端API / Express / Fastify → 基于分层的分组
- 单体仓库(apps/ + packages/) → 混合模式
- 现有结构 → 尊重并扩展当前模式
Step 2: Recommend Structure
步骤2:推荐结构
Based on project type and existing patterns, recommend where new code should live. Always prioritise colocation.
根据项目类型和现有模式,推荐新代码的存放位置。始终优先遵循就近原则。
Step 3: Validate
步骤3:验证
Check the existing structure against anti-patterns and naming conventions. Report violations.
对照反模式和命名规范检查现有结构,报告违规情况。