Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,21 +544,17 @@ Even inside your own worktree, operate defensively:
a build fast but leaves no `.d.ts`, so `gen:api-surface` cannot run at all under it —
that one needs a real build.
10. **A clean merge is not a working merge — but scope the re-check to the overlap**
([why](docs/agents/multi-agent-discipline.md#why-a-clean-merge-is-not-a-working-merge)). **Before opening a
PR, pull `main`, refresh build
state (§9), and run the full suite once.** After the PR is open, merge `main` only on a GitHub-reported
conflict, a `main`-caused CI red or a queue removal, then only the scoped re-checks; dogfood once, on the final head
([detail](docs/agents/multi-agent-discipline.md#where-joint-breakage-surfaces)):
- **Always:** rebuild what the merge touched, and if `packages/spec` moved on either
side, `pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec
check:generated` — generated snapshots (`api-surface`, baselines) are the classic
jointly-wrong artifact, and only a rebuild of the merged source can validate them
(never trust git's textual merge of a generated file). Then assert your branch's
*delta vs `main`* is still exactly what your PR intends (e.g. "N removed / 0
added").
- **Full `pnpm typecheck && pnpm test` again only when** the incoming commits touch
the same packages or the same behavior your diff does, or a conflict occurred
outside trivially-mechanical files.
([why](docs/agents/multi-agent-discipline.md#why-a-clean-merge-is-not-a-working-merge)). **Before opening a PR, pull
`main`, refresh build state (§9), and run the full suite once.** After the PR is open, merge `main` only on a
GitHub-reported conflict, a `main`-caused CI red or a queue removal, then only the scoped re-checks; a breaking PR's
dogfood runs on a CI runner once labelled `needs:dogfood-battery`, and the landing door reads that result on its
final head ([detail](docs/agents/multi-agent-discipline.md#where-joint-breakage-surfaces)):
- **Always:** rebuild what the merge touched, and if `packages/spec` moved on either side,
`pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generated` — only a rebuild of
the merged source validates a generated snapshot (`api-surface`, baselines); never trust git's textual merge of a
generated file. Then assert your branch's *delta vs `main`* is still exactly what your PR intends.
- **Full `pnpm typecheck && pnpm test` again only when** the incoming commits touch the packages or behavior your
diff does, or a conflict occurred outside trivially-mechanical files.
11. **Generated artifacts don't text-merge — a driver defers them and `pre-commit`
collects the debt.** `.gitattributes` routes the generator-owned artifacts to `merge=os-regen`
(`pnpm check:merge-driver` reconciles both directions); the driver does **not** regenerate — it records
Expand Down
Loading