Skip to content

Commit f6e182d

Browse files
claude[bot]claude
andauthored
docs(agents): drop the retired "gen:schema wipes gen:openapi" trap from three agent-facing surfaces (#11744)
`build-schemas.ts` stopped removing the output directory itself: its clean now routes through `clearOwnedOutputs()`, which skips every entry declared in `FOREIGN_JSON_SCHEMA_ARTIFACTS` — and `openapi.json` is the one entry there. So `gen:schema` has not deleted `gen:openapi`'s artifact for some time, and the run prints `↳ kept openapi.json — owned by gen:openapi (...)` when it spares it. Three agent-facing surfaces still taught the pre-fix trap and prescribed a `gen:openapi` rerun that is now a no-op: - .claude/agents/os-dev.md — the dispatch prompt itself - .claude/skills/pm-dispatch/references/landing-operations.md - scripts/pm/os-regen-merge.sh — both the header comment and the step-4 text the script PRINTS to the operator at run time The last of these is not named in the card; a repo-wide grep for the claim is what turned it up, and it is the copy an agent reads live. A doc naming a fixed trap does not fail loudly — it converts every reader into a false-positive reporter. The measured cost so far is one full card, filed and closed premise-false on the strength of this claim. The clauses are deleted rather than restated: the guarantee and its reasoning already live at the source, in packages/spec/scripts/lib/json-schema-out-dir.ts, pinned by scripts/json-schema-out-dir.test.ts and scripts/build-schemas-check-mode.test.ts. The MERGE-state anchor trap sitting beside each deleted clause is untouched and still true — in landing-operations.md the surrounding "顺序防两个陷阱" became "顺序防的陷阱", since only one of the two was ever an ordering trap. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2a6122b commit f6e182d

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

.claude/agents/os-dev.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,7 @@ dispatch prompt 只携带每单增量(裁决引文、裁决 / PM-机制假设分
187187
它。作数的断言是 `check:authorable-surface` 绿;`baseRev` 允许滞后(一行信息,不是错
188188
误)。⛔ 永不在 MERGE 态跑 `gen:schema`:HEAD 还是 merge 前的 tip,锚点会静默回滚到旧
189189
分叉点 —— 依然真实、门禁全绿、一次已落地的推进被吞掉。先 commit merge 再重生成(已机
190-
械化:`bash scripts/pm/os-regen-merge.sh`)。姊妹陷阱:`gen:schema` 的清理会抹掉
191-
`gen:openapi` 的产物(rest 里冒出假 5xx 失败);用
192-
`pnpm --filter @objectstack/spec gen:openapi` 恢复。
190+
械化:`bash scripts/pm/os-regen-merge.sh`)。
193191
- **家族规则:`git worktree` 只隔离工作树与 HEAD;`.git/` 下其余一切 —— refs(含
194192
`refs/remotes/*`)、stash 栈、config、hooks —— 全 worktree 共享;配方只有不点名共享态
195193
才 worktree-safe。家族同签名:操作看着本地、报成功,唯一症状是 `git status` 里出现他

.claude/skills/pm-dispatch/references/landing-operations.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
1212

1313
四步序已机械化:`bash scripts/pm/os-regen-merge.sh` —— ① `git merge origin/main`
1414
(⛔ 禁 rebase / force-push);② 生成物 `git checkout origin/main -- <路径>`;③
15-
**先 commit 掉 merge**;④ 整链重生成 + 生成物门禁全绿。顺序防两个陷阱:
15+
**先 commit 掉 merge**;④ 整链重生成 + 生成物门禁全绿。顺序防的陷阱:
1616

1717
- **MERGE 状态下跑 `gen:schema` 会把 authorable-surface 锚点静默倒退回旧分叉点**
1818
(HEAD 仍是合并前分支 tip),倒退后的锚点**依然 authentic**、全部门放行 ——「先
1919
commit 再重生成」的由来。
20-
- **`gen:schema` 的清场会抹掉 `gen:openapi` 的产物**(rest 包成串 `expected 503
21-
to be 200` 假红);补跑 `pnpm --filter @objectstack/spec gen:openapi` 即复原。
2220

2321
重生成后**断言所有兄弟单的条目都还在**;更硬的旁证是查**上一单的实现体**完好(带
2422
引号精确名 `git grep … origin/main -- <实现文件>`)—— 条目是索引,实现体才是被吞

scripts/pm/os-regen-merge.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@
2424
# BODY — still exist (quoted-exact-name git grep against origin/main).
2525
#
2626
# This script performs steps 1–3 and prints step 4 (the regen chain varies by
27-
# what the branch touches; running it blind would hide a red). Sister trap for
28-
# step 4: `gen:schema`'s cleanup wipes `gen:openapi`'s output, which shows up as
29-
# bogus 5xx assertions in the rest package — rerun
30-
# `pnpm --filter @objectstack/spec gen:openapi` to restore.
27+
# what the branch touches; running it blind would hide a red).
3128
#
3229
# ## Step 3 and the pre-commit hook agree (#8047)
3330
#
@@ -102,8 +99,7 @@ cat <<'EOF'
10299
→ step 4 (yours, in this order — the script stops here on purpose):
103100
1. build the spec build closure, then regenerate the WHOLE chain
104101
(e.g. pnpm --filter @objectstack/spec build && the gen:* scripts your
105-
surface touches; gen:schema's cleanup wipes gen:openapi's output — rerun
106-
pnpm --filter @objectstack/spec gen:openapi after it);
102+
surface touches);
107103
2. run the generated-artifact gates until fully green;
108104
3. assert every sibling PR's entries AND the previous PR's implementation
109105
body still exist: quoted-exact-name `git grep "<symbol>" origin/main -- <path>`

0 commit comments

Comments
 (0)