nomadro/.cursor/skills/no-frontend-deploy-without-ok/SKILL.md
Eric abdcafb1eb Ship Work access gate, pads/boards upgrades, and locale hydration fix on .com.
Gate /social/work behind join/login/profile; harden Work UX and LanguageSwitcher SSR; deploy portal, admin, and work API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-08 00:14:39 +08:00

57 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: no-frontend-deploy-without-ok
description: >-
Hard gate: never deploy / 上线 frontend without explicit user permission.
Use whenever 部署、上线、deploy、发版、upload .next、admin dist、小程序包, or any
script that ships portal/admin/miniprogram UI to a server.
---
# 未经允许,不能上线前端(写死)
## 铁律(逐字)
**未经允许,不能上线前端。**
未得到用户**本轮明确许可**时:禁止任何前端发版动作。没有例外(「修完顺手发」「冒烟需要线上」「全权操作」历史句、上一轮曾说过部署、默认 .com 发版流程)都不能覆盖本条。
## 什么算「上线前端」
下列任一均算,必须先停、先问:
| 动作 | 示例 |
|------|------|
| 门户 Next 产物 | `pnpm build` 后上传 `.next`、`_upload_next_us.py`、`deploy_platform_upgrade_com.py`、`_deploy_*_us.py` 里带 portal `.next` |
| 管理后台 SPA | `pnpm build:admin-com` / `build:admin` 后上传 `dist` |
| 小程序 / Taro | 上传 weapp/tt/xhs/H5 构建包、提审包 |
| 线上替换 UI | `systemctl restart nomadro` **且**刚换了 `.next` / 静态前端;rsync/scp 门户 `src/` 指望线上再 build(仍禁止) |
| 对用户宣称已上线 | 说「已上线 / 已部署前端 / 打开某某 URL 看新 UI」而本轮未获许可 |
## 允许(不叫上线前端)
- 本地改代码、`pnpm dev`、本地 `pnpm build` **仅自测**(产物不上传)
- 只动后端:FastAPI / work_svc / PocketBase schema / systemd 环境变量 / 不换 UI 产物的服务重启
- 只 curl / 读日志排查线上,不换前端包
若脚本**同时**含前端包 + API:未获前端许可时,**只跑 API/后端部分**,或整段不跑并说明卡在前端门禁。
## 许可怎么算「明确」
本轮用户原话须直接授权前端发版,例如:
- 「可以上线前端」「部署前端」「发门户」「上传 .next」「按 com-local-build-deploy 发」
- 「全权操作 / 部署上线」且语境是发版(仍以本轮为准;不要用更早会话的「全权」推断)
**不算许可:**「继续改」「修好」「参考开源深度定制」「部署 API / 管理后台后端」「看看线上」「冒烟一下」。
## Agent 行为
1. 触达任何前端上线步骤前,先读本 skill。
2. 无明确许可 → **立刻停止**,用一两句问用户是否允许上线前端;禁止先传再问。
3. 有许可 → 再读 `com-local-build-deploy`,本地构建再上传;禁止在美国机上 `next build`。
4. 未获许可却已改好前端:只保留本地改动 + 说明如何自测;**不要**自行发版。
## 与其它规则
- `com-first-deploy.mdc`:默认发版目标仍是 `.com`,但**须先有本 skill 的前端许可**。
- `com-local-build-deploy`:有许可后的执行手册,不能单独当作许可。