新增仓库贡献指南文档

This commit is contained in:
wkc
2026-04-15 10:13:59 +08:00
parent fb388e22c5
commit 30a341ee73
2 changed files with 42 additions and 0 deletions

27
AGENTS.md Normal file
View File

@@ -0,0 +1,27 @@
# Repository Guidelines
## Project Structure & Module Organization
This repository follows the RuoYi-Vue split architecture. Backend modules live at the repo root: `ruoyi-admin` is the Spring Boot entry point, `ruoyi-framework` holds security and web infrastructure, `ruoyi-system` contains business services and MyBatis mappers, `ruoyi-common` stores shared utilities, and `ruoyi-quartz` / `ruoyi-generator` provide scheduling and code generation. Frontend code is in `ruoyi-ui`, with pages under `src/views`, API wrappers under `src/api`, shared components under `src/components`, and static assets under `src/assets`. SQL scripts belong in `sql/`, and project documents go in `doc/`.
## Build, Test, and Development Commands
Backend:
- `mvn clean package -DskipTests` builds all Java modules.
- `mvn test` runs backend tests for the full Maven reactor.
- `mvn -pl ruoyi-admin -am spring-boot:run` starts the admin service with dependent modules.
Frontend:
- `cd ruoyi-ui && nvm use && npm install` installs frontend dependencies with Node managed by `nvm`.
- `cd ruoyi-ui && npm run dev` starts the Vue 2 development server.
- `cd ruoyi-ui && npm run build:prod` creates the production bundle.
## Coding Style & Naming Conventions
Use 4 spaces for Java indentation and keep packages under `com.ruoyi.<module>`. Follow existing suffixes such as `*Controller`, `*Service`, `*ServiceImpl`, and `*Mapper`; mapper XML files should stay under `src/main/resources/mapper/**`. Vue files follow the existing feature layout, for example `src/views/system/user/index.vue` and `src/api/system/user.js`. Match the repositorys current naming style instead of introducing new patterns.
## Testing Guidelines
There are currently no committed `src/test` files, so new backend features should add focused tests under `module/src/test/java` using the `*Test` suffix. When changing frontend behavior, at minimum verify `npm run build:prod` succeeds and smoke-test the affected page flow locally. Keep tests narrow and aligned to the module you changed.
## Commit & Pull Request Guidelines
Current history is minimal (`init`), so keep commit messages short, specific, and in Chinese, for example `新增贷款定价审批接口`. Ignore `.DS_Store` changes. PRs should state the affected modules, summarize behavior changes, list any SQL or configuration updates, and include screenshots for UI changes.
## Agent-Specific Notes
Every change should leave an implementation record in `doc/`. If a feature touches both backend and frontend, maintain separate frontend and backend implementation plans; otherwise, record only the impacted side.

View File

@@ -0,0 +1,15 @@
# AGENTS 贡献指南实施文档
## 修改内容
- 新增根目录 `AGENTS.md`,整理仓库贡献指南。
- 文档内容基于当前仓库实际结构编写,覆盖后端多模块、前端 `ruoyi-ui`、常用构建命令、测试约定、提交与 PR 要求。
## 依据
- 后端为 Maven 聚合工程,模块包括 `ruoyi-admin``ruoyi-framework``ruoyi-system``ruoyi-common``ruoyi-quartz``ruoyi-generator`
- 前端位于 `ruoyi-ui`,使用 Vue 2 与 Vue CLI。
- 当前仓库历史提交极少,仅有 `init`,因此提交规范采用最小明确约束。
- 当前未发现已提交的 `src/test` 测试文件,测试章节据此说明现状并给出新增约定。
## 保存路径确认
- 贡献指南保存路径:`/Users/wkc/Desktop/loan-pricing/loan-pricing-jdk-1.8/AGENTS.md`
- 本次实施文档保存路径:`/Users/wkc/Desktop/loan-pricing/loan-pricing-jdk-1.8/doc/2026-04-15-AGENTS贡献指南实施文档.md`