mirror of
https://github.com/fugary/simple-element-plus-template.git
synced 2026-09-11 09:23:53 +00:00
docs: Agent内置工具代码检索规范与优化规则配置
This commit is contained in:
14
.agents/rules/rules.md
Normal file
14
.agents/rules/rules.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
trigger: always_on
|
||||||
|
---
|
||||||
|
|
||||||
|
# 通用规范
|
||||||
|
1. 生成提交日志时,请使用中文,日志主要包括本次修改实现的功能的信息。
|
||||||
|
2. 默认不自动提交 (git commit),除非在提示词中明确要求提交。
|
||||||
|
3. **内置工具与文件检索规范**:阅读、分析和检索代码与项目文件时,必须优先使用内置专有工具(如 `view_file`、`grep_search`、`find_by_name`、`list_dir` 等),严禁随意通过终端执行 `Get-Content`、`cat`、`type`、`dir` 等 shell 命令读取文件。仅在执行项目构建、测试验证、Git 提交等必须依赖宿主环境的任务时才调用终端命令,避免触发多余的命令确认拦截。
|
||||||
|
|
||||||
|
# 前端代码规范 (Vue 3 + JavaScript + Element Plus)
|
||||||
|
1. **组件优先**:优先使用 `common-*` 等自定义通用组件(如 `<common-form>`, `<common-table>`, `<common-table-form>`, `<common-window>`, `<common-descriptions>`, `<common-icon>` 等),图标展示必须优先使用 `<common-icon>`。
|
||||||
|
2. **静态校验**:修改前端 JS 或 Vue 等文件时使用 ESLint 规则验证并通过后继续(`npm run lint` 0 错误 0 警告)。
|
||||||
|
3. **通用交互**:通用交互(加载提示、确认弹窗、日期格式化)优先调用挂载在全局的 `$coreShowLoading`、`$coreConfirm`、`$date` 等工具方法。
|
||||||
|
4. **国际化与多主题**:界面文案考虑支持中英文国际化,适配明亮与暗黑主题。
|
||||||
23
AGENTS.md
Normal file
23
AGENTS.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Simple Element Plus Template - AGENTS.md
|
||||||
|
|
||||||
|
## 1. 项目概览 (Project Overview)
|
||||||
|
基于 Vue 3 + JavaScript + Vite + Element Plus 的中后台前端通用模版。
|
||||||
|
|
||||||
|
- **主要仓库**: [fugary/simple-element-plus-template](https://github.com/fugary/simple-element-plus-template)
|
||||||
|
|
||||||
|
## 2. 技术栈 (Tech Stack)
|
||||||
|
- **框架/构建**: Vue 3 + Vite + JavaScript
|
||||||
|
- **组件库**: Element Plus, @element-plus/icons-vue
|
||||||
|
- **状态管理**: Pinia, pinia-plugin-persistedstate
|
||||||
|
- **路由**: Vue Router
|
||||||
|
- **工具库**: Axios, Lodash-es, VueUse, Vue I18n
|
||||||
|
|
||||||
|
## 3. 项目规则 (Project Rules)
|
||||||
|
为了保证项目的开发一致性和质量,AI 代理在协作时需遵循项目内置的规则:
|
||||||
|
|
||||||
|
详细规则请参考:[.agents/rules/rules.md](.agents/rules/rules.md)
|
||||||
|
|
||||||
|
主要包含:
|
||||||
|
1. **提交日志**: 生成提交日志时请使用 **中文**。
|
||||||
|
2. **前端开发**: 修改前端 JS、Vue 等文件时需通过 **ESLint** 验证(`npm run lint`)。
|
||||||
|
3. **内置工具与文件检索**: 阅读、分析和检索代码与项目文件时,必须优先使用内置专有工具(如 `view_file`、`grep_search` 等),避免随意通过终端执行 `Get-Content`/`cat`/`type` 等 shell 命令读取文件。
|
||||||
Reference in New Issue
Block a user