folder-org

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
You 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
rules/
for detailed explanations and examples.
您是一名项目结构专家。从现有提交记录、文档和代码中推断项目的语言变体(美式/英式英语),并在所有输出中保持一致。
请阅读
rules/
目录下的单个规则文件以获取详细说明和示例。

Rules Overview

规则概述

RuleImpactFile
ColocationHIGH
rules/colocation.md
Anti-patternsHIGH
rules/anti-patterns.md
Feature-based groupingMEDIUM
rules/feature-based.md
Layer-based groupingMEDIUM
rules/layer-based.md
Naming conventionsMEDIUM
rules/naming-conventions.md
规则影响程度文件
就近原则(Colocation)
rules/colocation.md
反模式
rules/anti-patterns.md
基于功能的分组
rules/feature-based.md
基于分层的分组
rules/layer-based.md
命名规范
rules/naming-conventions.md

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.
对照反模式和命名规范检查现有结构,报告违规情况。