Skip to content

Commit bb86347

Browse files
docs(agents): item 10 runs targeted gates before a PR; the full suite runs in CI (#38768)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBHuLciv5hYVYUu4pypDP48J)_ Fixes #38740 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户无感:只改开发代理读的仓库规则文件里两处,开 PR 前和收尾时本地只跑与改动相关的检查,完整测试交给云端流水线。 - 为什么做:两份开发规则对「开 PR 前本地跑多少」说法相反,代理按优先的那份会在本地跑全量,而另一份禁止、也跑不完;按已定方向改成一致。 - 出错会怎样:最坏是代理本地少跑一些检查,云端流水线照常全量把关,改动可直接撤回。 - 要你做什么:审阅并批准这条规则改动(规则文件须人工批准)。 ## What changes `AGENTS.md`, two spots, nothing else: **1. Multi-agent working discipline item 10**, two sentences: - Bold sentence: "run the full suite once" becomes "run targeted gates; CI runs the full suite". - The re-check sub-bullet: "**Full `pnpm typecheck && pnpm test` again only when** ..." becomes "**Targeted gates again only when** ...". Its trigger (incoming commits touching your packages or behavior, or a non-mechanical conflict) is unchanged. The rest of item 10 is untouched in wording: the merge-only-on-conflict / CI-red / queue-removal rule, the scoped re-checks, the dogfood opt-in lane (`needs:dogfood-battery`, the landing door reading its result on the final head) and the "Always" bullet. Three lines of the first paragraph are re-wrapped only because the bold sentence grew. **2. Post-Task Checklist step 1**: "`pnpm test` — verify nothing broke. Touched a type-check-covered package? `pnpm typecheck` too." becomes "Targeted gates (Multi-agent discipline §10): touched packages' `test` and `typecheck`; CI runs the full suite." A root `pnpm test` is the turbo run over every package, the same full local run item 10 drops. Folded in by the claim amendment on the card (comment 7279575228). Direction is the triage ruling on the card (comment 7274564007): the dev-agent definition's targeted-local, full-farm-in-CI practice (`.claude/agents/os-dev.md`, sections 资源纪律 item 3 定向,不扫全 and 本地验证范围 —— 本地只跑定向门禁,全农场归 CI) is the merged practice, so both AGENTS.md spots are reworded to it. `.claude/agents/os-dev.md` is read, not written. `docs/agents/multi-agent-discipline.md` is unchanged: the two passages item 10 links to (Why a clean merge is not a working merge; Where joint breakage surfaces) do not restate a full local run. Byte budget (`scripts/pm/check-skill-line-ratchet.mjs`): AGENTS.md 78697 to 78710 bytes against the ceiling 78712 (headroom 15 to 2): item 10 -1 byte, step 1 +14; 1054 lines before and after. The ceiling row is not moved. **Read first** (risk order): `AGENTS.md` lines 546 to 557 (item 10), then line 1015 (Post-Task Checklist step 1); the only two hunks. **Two-minute verification:** on this branch, `git grep -n "run the full suite once" AGENTS.md` prints nothing, `git grep -n "run targeted gates; CI runs the full suite" AGENTS.md` prints line 548, and `git grep -n "verify nothing broke" AGENTS.md` prints nothing. ## Tests Prose-only change to a rules file; no code, no tests to add. No changeset: AGENTS.md is a repo-root file that ships in no package's `files[]`, so this PR carries `skip-changeset`. ## Acceptance notes - The dispatch order's commit trailer spelling (with a model name) was refused by the pre-push hook; the commit carries the model-free pair AGENTS.md prescribes. ## Verification Local gates at head 5f61101, derived by `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` (16 commands), each run in the foreground with its exit code captured before any pipe; every family CI runs is left to CI. <details><summary>Derived gates: 16 run, all exit 0</summary> ```text node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:docs-audit-scope :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-governed-prose :: exit 0 pnpm check:pm-skill-id-lint :: exit 0 pnpm check:pm-skill-ratchet :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:required-contexts :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` `--ran` reconciliation: "16 derived famil(ies) accounted for — 16 run, 0 NOT-MEASURED (a DERIVED zero — all 16 recorded an exit code and none of them is 3)." </details> <details><summary>Byte ratchet reading</summary> ```text check-skill-line-ratchet: AGENTS.md is 78710 bytes (ceiling 78712; headroom 2). ``` Before the edits, on 111ad63: 78697 bytes (headroom 15); after item 10 alone, on 20307fa: 78696 (headroom 16). </details> `node scripts/check-platform-checklist.mjs --changed-from origin/main`: exit 0, "0 anchored files in the change set — nothing judged". --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzhPdWmTd47Fi2bKYZS)_ <!-- signed: repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent d316627 commit bb86347

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎AGENTS.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -545,16 +545,16 @@ Even inside your own worktree, operate defensively:
545545
that one needs a real build.
546546
10. **A clean merge is not a working merge — but scope the re-check to the overlap**
547547
([why](docs/agents/multi-agent-discipline.md#why-a-clean-merge-is-not-a-working-merge)). **Before opening a PR, pull
548-
`main`, refresh build state (§9), and run the full suite once.** After the PR is open, merge `main` only on a
549-
GitHub-reported conflict, a `main`-caused CI red or a queue removal, then only the scoped re-checks; a breaking PR's
550-
dogfood runs on a CI runner once labelled `needs:dogfood-battery`, and the landing door reads that result on its
551-
final head ([detail](docs/agents/multi-agent-discipline.md#where-joint-breakage-surfaces)):
548+
`main`, refresh build state (§9), and run targeted gates; CI runs the full suite.** After the PR is open, merge
549+
`main` only on a GitHub-reported conflict, a `main`-caused CI red or a queue removal, then only the scoped
550+
re-checks; a breaking PR's dogfood runs on a CI runner once labelled `needs:dogfood-battery`, and the landing door
551+
reads that result on its final head ([detail](docs/agents/multi-agent-discipline.md#where-joint-breakage-surfaces)):
552552
- **Always:** rebuild what the merge touched, and if `packages/spec` moved on either side,
553553
`pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generated` — only a rebuild of
554554
the merged source validates a generated snapshot (`api-surface`, baselines); never trust git's textual merge of a
555555
generated file. Then assert your branch's *delta vs `main`* is still exactly what your PR intends.
556-
- **Full `pnpm typecheck && pnpm test` again only when** the incoming commits touch the packages or behavior your
557-
diff does, or a conflict occurred outside trivially-mechanical files.
556+
- **Targeted gates again only when** the incoming commits touch the packages or behavior your diff does, or a
557+
conflict occurred outside trivially-mechanical files.
558558
11. **Generated artifacts don't text-merge — a driver defers them and `pre-commit`
559559
collects the debt.** `.gitattributes` routes the generator-owned artifacts to `merge=os-regen`
560560
(`pnpm check:merge-driver` reconciles both directions); the driver does **not** regenerate — it records
@@ -1012,7 +1012,7 @@ Both non-handshake shapes, and how to classify and probe your own:
10121012

10131013
## Post-Task Checklist
10141014

1015-
1. `pnpm test` — verify nothing broke. Touched a type-check-covered package? `pnpm typecheck` too.
1015+
1. Targeted gates (Multi-agent discipline §10): touched packages' `test` and `typecheck`; CI runs the full suite.
10161016
2. **Land it — don't leave passing work in the working tree.** Once tests pass, create
10171017
a feature branch, commit, push, open a PR, and — once remote CI is fully green and
10181018
the PR is accepted — arm auto-merge so the queue lands it (Multi-agent discipline §7). A finished task

0 commit comments

Comments
 (0)