diff --git a/control/AGENTS.md b/control/AGENTS.md index ec0ba67..9afe3b8 100644 --- a/control/AGENTS.md +++ b/control/AGENTS.md @@ -112,7 +112,7 @@ The config preview rendering pipeline: merge template + profile + overlays → r - **No tabs**: use spaces for indentation in all source files. - **No `fetch()` in templates** for page data — all API calls must go through Go server-side handlers. JS is only for UI interactivity (modals, carousels, confirm dialogs). - **No inline `onclick` with complex quoting** — use `data-*` attributes + event delegation instead. -- **Use `pwsh`** for PowerShell commands (v7.6.4 in PATH — `C:\Program Files\PowerShell\7`, not `powershell.exe`). +- **Use `pwsh`** for PowerShell commands on Windows dev machine (PATH 中的 PowerShell 7,勿用 `powershell.exe`;不要硬编码版本号)。测试盒子上用 bash(Ubuntu)。 - **重启服务**:统一用 `pwsh -File scripts/safesightd.ps1 restart`,它会先编译、停旧进程、再启动新进程并做健康检查。不要手动 kill + build + start。 - **如无必要,不使用数据库事务**:SQLite 只允许一个写者,事务会阻塞所有其他写操作。单个 `Exec` 已是原子操作,绝大多数场景不需要包裹事务。仅模板重命名等必须原子完成的多步操作才用事务。 - **调试时只加日志,不改代码**:遇到 bug 先用 `fmt.Printf` 全量打印关键路径的状态和数据流,定位根因后再动手修。不要猜测、不要加 workaround(重试、超时、锁之类)。 diff --git a/edge/AGENTS.md b/edge/AGENTS.md index b5b6a3d..d76dbb0 100644 --- a/edge/AGENTS.md +++ b/edge/AGENTS.md @@ -24,9 +24,8 @@ This repository is a plugin-based C++ video analytics system for RK3588. Develop ## Shell Environment Rules -- For agent-run shell commands on this workstation, use PowerShell 7.6 (current: 7.6.4, installed at `C:\Program Files\PowerShell\7\pwsh.exe`, first in user PATH) instead of Windows PowerShell 5.1. -- Prefer invoking `pwsh` from PATH (resolves to 7.6.4); do not hardcode old WindowsApps MSIX paths (`Microsoft.PowerShell_7.6.0.0` is obsolete). -- Do not rely on the system-default `powershell.exe` resolving to the desired version. +- **Windows 开发机**:PowerShell 命令用 `pwsh`(PATH 中的 PowerShell 7,勿用系统默认 `powershell.exe` 5.1)。不要硬编码具体版本号或 WindowsApps MSIX 路径——升级后即过时。 +- **Ubuntu 测试盒子**:脚本语言为 bash(设备端本身也是 bash),直接用 bash/sh 执行。 ## Plugin and Architecture Rules