Files
eth_hedge_sim/.cursor/rules/deliver-and-chat.mdc
T
dekun b7e055e37b Add always-apply rule: deploy after edits; chat-only when user says 先聊.
Also split strategy settings into subtabs and hide sim equity in LIVE.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-26 21:41:16 +08:00

39 lines
1.6 KiB
Plaintext
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.
---
description: 改完必推送部署;用户说「先聊」则只讨论不改代码
alwaysApply: true
---
# 交付与对话模式(硬指令)
## 先聊模式(最高优先)
用户消息含 **「先聊」**(或明确说只讨论、不要改代码、先别动手)时:
- **禁止**改代码、写文件、提交、推送、部署
- 只做讨论、方案对比、审计结论、问答
- 用户之后明确说「改吧 / 实现 / 动手」再进入改代码
## 改完必推送 + 部署
在**本仓库**完成一轮实际代码修改后(用户未说「先聊」、且不是纯问答),必须收尾:
1. **提交**:有改动则 `git add` 相关文件并 `git commit`(勿提交 `.env`、密钥、本地临时脚本如 `scripts/_ssh_*`、`_t.py`
2. **推送**`git push origin HEAD`(或当前跟踪分支)
3. **部署**:用本机脚本更新服务器(git pull + 构建 + pm2),例如:
```powershell
$env:PYTHONIOENCODING='utf-8'
# DEPLOY_PASS 须已在环境中配置;勿把密码写进规则或提交到仓库
& .\.venv\Scripts\python.exe .\scripts\deploy_remote.py
```
- 服务器:`47.236.184.99`,目录 `/opt/eth_hedge_sim`,进程 `eth-hedge-api`
- 部署成功后简要回报:commit、push、health 是否 OK
- 若用户明确说「先别部署 / 只提交不推 / 只推不部署」,则按用户当次要求覆盖本条
## 例外(可不推送部署)
- 「先聊」或只读审计、解释、方案讨论
- 仅改本地未跟踪的临时探测脚本且用户未要求交付
- 推送/部署失败时说明原因与已完成步骤,不要假装成功