# Codex 项目规则 ## 编码规范 - 代码架构简单,逻辑清晰,每次生成代码量精简。保证人类可以较好的review。 ## 验证命令 - 在修改本项目代码后,不要自动运行构建或调试命令。 - 这包括 `npm run build`、`npm run dev`、`npm run serve`、`npm run preview`、`./package.json` 的 scripts 中的命令、Vite 的 dev/preview 命令、本地服务器启动,以及基于浏览器的调试或截图。 - 只有当用户在当前对话中明确要求进行这些验证时,才可以运行这些命令。 - 允许进行只读检查,例如查看 diff 或源码文件。 - 在汇报已完成的工作时,需要说明:由于该项目规则要求,已跳过 build/debug 验证。 ## 运行环境(所有会话共用) - **前端服务地址:`http://127.0.0.1:8000/#/cockpit`** —— 这是本驾驶舱前端唯一的开发/验收入口。所有会话在需要打开、引用或验收前端页面时,一律使用该地址,不要另起端口或另建服务。 - **后端接口地址:`http://192.168.110.96:8301`** —— 只读接口基址 `http://192.168.110.96:8301/api/cockpit/v1/**`,免鉴权。需要真实联调或复验时用它。 - 该地址只是**约定**,不构成启动授权:是否运行 dev server 仍按「验证命令」一节执行(未获用户明确要求不得启动)。 - 若地址变更,改这一节即可,不要在其它文档里另写第二份。 ## Git 提交与推送(所有会话共用,维护者 2026-10-29 立) - **提交前先检测本地 git 账户**:`git config user.name` / `user.email` 必须是许可身份——前端仓库 `City-Lifeline-Cockpit` 用 **ChenJZ**,后端仓库 `pipe-ner-server` 用 **Kazerin**(邮箱 `2589288438@qq.com`)。合法用户 ID 只有 `Kazerin` 和 `ChenJZ` 两个;发现 `lead@local` 之类的占位身份,先改正再提交,不得带错误身份提交或推送。 - **提交信息一律中文**,格式统一为 `类型(范围): 中文描述`(类型用 feat/fix/docs/chore/test/refactor,范围常用 cockpit),不用英文句子、不乱命名;同一批工作按主题拆成**阶段性提交**,不把无关并行在制品混进同一个提交。 - **推送前自查**:`git log origin/master..HEAD --format='%h %an %s'` 逐条核对作者与信息后再 `git push origin master`;历史已推送的 `lead ` 作者提交(如后端 `674b7db5`)不改写历史,自本共识起的新提交必须用正确身份。 ## Agent skills ### Project skills `skills/` at the repo root is this project's agent-skill root, discovered as Project Skills for this workspace. `skills/tvt-js-plugin-builder/` is the TvT.js and plugin-workflow baseline: load `/tvt-js-plugin-builder` for plugin, case, preview-metadata, packaging, runtime-mode and integration work. See `docs/agents/domain.md`. ### Issue tracker Issues and specs live as local markdown under `.scratch//`. See `docs/agents/issue-tracker.md`. ### Triage labels Use the five canonical triage role strings unchanged. See `docs/agents/triage-labels.md`. ### Domain docs Use single-context domain docs, with `openspec/specs/` and `skills/tvt-js-plugin-builder/` as the TvT.js local spec and workflow baseline. See `docs/agents/domain.md`.