Skip to content

Commit bde3072

Browse files
os-steveclaude
andauthored
docs(agents): show the targeted-vitest spelling and refuse the bare separator (#11425)
`os-dev.md` rule 3 named `pnpm --filter <pkg>`, `--maxWorkers=2` and `--concurrency=2` without ever showing how they join, so every reader had to invent the join and npm semantics supplied `--`. Measured: the separator makes vitest discard the file pattern AND `--maxWorkers`, the whole package suite runs, and it exits 0 — a false green that reads as the narrow run that was asked for. Rule 3 now carries the literal working command and refuses the separator. `AGENTS.md`'s dev-server parenthetical ("flags after `--` are forwarded") is re-scoped, since what pnpm forwards is the separator itself. Both files sit at zero-headroom line ratchets, so this is a net-zero rewrite: the measurements stay on the card, per the ratchet's own rule that stories live on cards and not in operational text. Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx Co-authored-by: Claude <noreply@anthropic.com>
1 parent 353f4e8 commit bde3072

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.claude/agents/os-dev.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ JSON,所以终报消息就是 JSON 本身,别无其它。
7575
收尾打印本次持锁时长,过长自己喊出来。只包**命令本身**,不包你的阅读与判断;结论读它
7676
印的 VERDICT 行,不读裸 `$?`。排队是常态,不是挂死。
7777
2. **压住堆**:重命令前缀 `NODE_OPTIONS=--max-old-space-size=4096`(要抬需给理由)。
78-
3. **定向,不扫全**:只 build/test 受影响的包(`pnpm --filter <pkg> `),vitest
79-
`--maxWorkers=2`,turbo `--concurrency=2`
78+
3. **定向,不扫全**:只 build/test 受影响的包 —— `pnpm --filter <pkg> exec vitest run --maxWorkers=2 <file>`,turbo `--concurrency=2`
79+
⛔ 参数永不经裸 `--` 转交:`--` 之后的一切被 vitest 静默丢弃,文件模式与 `--maxWorkers` 一并失效,整包跑完、退出码 0、读起来像一次通过
8080
4. **清理是任务的一步**:PR 开出后,
8181
`rm -rf <path>/node_modules && git worktree remove <path>` —— **不加 force**。⛔ 永不
8282
上来就 `--force`:node_modules 已删的情况下,拒绝移除说明里面有东西没提交 —— 你自己

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pays its first load at module top; `pnpm check:test-source-alias` gates it.
127127

128128
`--fresh`: ephemeral tempdir (auto-deleted on exit) + `--seed-admin` (POSTs sign-up, prints creds — default `admin@objectos.ai` / `admin123`, override via `--admin-email`/`--admin-password`). The seeded admin is auto-promoted to **platform admin** (the system seed identity `usr_system` is skipped), so Setup/Studio are reachable on first login.
129129

130-
Rules: never run two backends on port 3000; for backend tasks pick a random port and tear it down; **never kill a server you didn't start** (other agents/the user may be using it — see Multi-agent discipline §8); always use a `pnpm dev`/`dev:crm`/`dev:showcase` script (flags after `--` are forwarded), not raw `pnpm --filter`.
130+
Rules: never run two backends on port 3000; for backend tasks pick a random port and tear it down; **never kill a server you didn't start** (other agents/the user may be using it — see Multi-agent discipline §8); always use a `pnpm dev`/`dev:crm`/`dev:showcase` script, not raw `pnpm --filter` — but note what pnpm actually does with `--`: it forwards the **separator itself** into the child's argv, so this spelling only works where the receiving CLI tolerates a leading `--`. ⛔ Do not carry it over to test commands — vitest silently discards everything after a bare `--` (measured; see `.claude/agents/os-dev.md` → Toolchain traps).
131131

132132
```bash
133133
pnpm dev:crm -- --fresh -p 38421 # start; debug via curl

0 commit comments

Comments
 (0)