xyc
2026-10-26 241a9a9e368156196dac4d36c09c4a46c2334f92
AGENTS.md
@@ -10,6 +10,7 @@
统一使用一键脚本 `start-dev.ps1`(项目根目录),且必须**在沙箱外(require_escalated)运行**:
powershell -NoProfile -ExecutionPolicy Bypass -File start-dev.ps1
- At the start of every development task, automatically check and start both services with `start-dev.ps1` when needed; do not wait for a separate user request.
- 脚本会自动检测 8090/8080 是否已监听(已在跑则跳过),并等待验证就绪。
- 后端等价命令:`cmd /c mvn.cmd -q spring-boot:run -f traffic-audit-server\pom.xml > backend.log 2>&1`
  - 成功标志:backend.log 出现 `Started TrafficAuditApplication` 与 `Tomcat started on port(s): 8090`
@@ -53,7 +54,13 @@
   - 需要交接的部分:把"当前状态 + 待办"追加到 `HANDOFF.md`(同事的做法就是这样)。
3. **git 工作流(2026-09-03 用户授权,无需再询问是否推送;提交粒度参考同事 xyc)**
   - **一条提交 = 一个改动**:代码/脚本 + 该改动的说明文档(`HANDOFF.md` / 方案 / 口径清单)放在同一条提交里;不要为每个小改动单独建报告再单独提交。
   - message 写法:`feat(模块): …` / `fix(模块): …` / `docs: …` / `docs(交接): …`,一句话说清"改了什么"。
   - message 写法(**对齐同事 xyc 风格;2026-10-09 用户确认**):`feat(模块): …` / `fix(模块): …` / `docs: …` / `docs(模块): …`,一句话说清"改了什么"。
     - **类型只用** `feat` / `fix` / `docs`(同事另有过少量 `chore`);不要自造类型。
     - **scope 用模块名**,中英均可——同事用过 `holiday` / `version` / `deploy` / `observation` 与 `交接` / `部署` / `节假日` / `汇总表`;**约 6 成提交不带 scope**(如 `docs: add …`),不带也合规。
     - **不写正文**(同事 91 条里 90 条无正文):全部信息放在主题这一行,不要 bullet、不要多段、不要署名或工具尾注。
     - 主题中位约 40 字(最长 119),可以长,但只讲**一件事**。
     - 待验收标注按第 5 条以 `(待验收)` 收尾,例:`fix(汇总大表): 四页取数月份列改按表头动态定位(待验收)`。
   - **禁止入库**:临时脚本与调试产物(`_tmp_*`、`_shots/`、`outputs/`)、构建产物(jar / dist / target)、密钥与口令、大体积备份(`*.sql` 全库导出);过程日志与日结只留本地。
   - 推送前:先按上面完成测试,再 `git fetch origin` 与远端 `main` 对比合并(必要时解决冲突),确认无误后 commit 并 push 到公司 gitea(`http://61.183.254.94:3000/r/trafficAudit.git`,账号 zyj)。
   - 若远端已有同事新提交:必须先合并/基于最新再推,禁止强推覆盖同事代码。