54 lines
2.3 KiB
Markdown
54 lines
2.3 KiB
Markdown
# AGENTS.md
|
||
|
||
oci-portal-dash:OCI Portal 前端(Vue 3 + Vite + TypeScript + Naive UI + Tailwind CSS v4 + Pinia)。本文件面向 AI 编码助手;人类文档见 [README.md](README.md)。
|
||
|
||
## 语言与交付
|
||
|
||
- 用中文回答与写注释
|
||
- commit message 用中文,不超过 50 字
|
||
- 函数不超过 30 行
|
||
|
||
## 仓库操作铁律
|
||
|
||
- **仅当用户明确提出「提交」「推送」时才执行 git 操作**
|
||
- 双 remote:`gitea`(日常默认)与 `github`(公共镜像);推送默认到 `gitea`,仅用户明示「发版」或「推到 github」时才推 `github`
|
||
|
||
## 编码规范(写代码前读)
|
||
|
||
- 规范入口:[.trellis/spec/frontend/index.md](.trellis/spec/frontend/index.md)(目录结构 / TS 与组件写法 / 设计 token / API 与状态分篇)
|
||
- 颜色、圆角、间距用设计 token,禁止硬编码 hex(组件库必需的具体值除外)
|
||
- 新增请求走 `src/api/` 统一封装,DTO 类型进 `src/types/`
|
||
- 文件放对层:views / components / composables / api / stores / types
|
||
|
||
## 质量门(提交前必过)
|
||
|
||
```bash
|
||
npm run lint && npm run typecheck && npm run test && npm run build
|
||
```
|
||
|
||
## 文档同步
|
||
|
||
- 改页面能力 / 环境变量 / 构建形态时,同步更新 README.md;CHANGELOG.md 只在发版时写对应版本段,日常提交不记录
|
||
|
||
|
||
<!-- TRELLIS:START -->
|
||
# Trellis Instructions
|
||
|
||
These instructions are for AI assistants working in this project.
|
||
|
||
This project is managed by Trellis. The working knowledge you need lives under `.trellis/`:
|
||
|
||
- `.trellis/workflow.md` — development phases, when to create tasks, skill routing
|
||
- `.trellis/spec/` — package- and layer-scoped coding guidelines (read before writing code in a given layer)
|
||
- `.trellis/workspace/` — per-developer journals and session traces
|
||
- `.trellis/tasks/` — active and archived tasks (PRDs, research, jsonl context)
|
||
|
||
If a Trellis command is available on your platform (e.g. `/trellis:finish-work`, `/trellis:continue`), prefer it over manual steps. Not every platform exposes every command.
|
||
|
||
If you're using Codex or another agent-capable tool, additional project-scoped helpers may live in:
|
||
- `.agents/skills/` — reusable Trellis skills
|
||
- `.codex/agents/` — optional custom subagents
|
||
|
||
Managed by Trellis. Edits outside this block are preserved; edits inside may be overwritten by a future `trellis update`.
|
||
|
||
<!-- TRELLIS:END --> |