Repository navigation
docs: add PR template and stack, verification and platform rules to the agent guide - #216
Conversation
…m rules to the package guide The root AGENTS.md duplicated the package guide. The package guide now names the gh stack CLI for stacked PRs, asks for observed facts before building on an assumption, tells an upstack PR to delete tests that no longer add confidence, and requires a check on both platforms. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Kudo
left a comment
There was a problem hiding this comment.
- from my experience, agents create pr using cli or api that would pass PULL_REQUEST_TEMPLATE.md. you should point out PULL_REQUEST_TEMPLATE.md in AGENTS.md so that agents will read it.
- coincidentally i was thinking to add a little section in pr description. something like "Trying to pitch shortly about the pr". example pr #173. not sure if that's useful
| - **Build expected values with the product's helpers.** A test of a platform-specific value (an argv, a path, an escape) builds the expected value with the helper that the code uses. | ||
| - **Build fixtures from one builder.** Give each fixture type one builder that takes overrides, and pass only the fields that differ, for example `makeLock({ pid: 4242 })`. Then a new field is a one-file change. | ||
| - **Test both platforms.** When a change touches behavior that runs on iOS and Android, test it on both. A pass on one platform proves nothing about the other. | ||
| - **EAS simulator sessions are usually free here.** This repo is developed by Expo employees, so start an EAS simulator session or a live cloud run when a check needs one, without asking. Do not abuse them, but do not be afraid to use them. Stop the session when you finish. |
There was a problem hiding this comment.
[bug] "Usually free" and "start an EAS simulator session or a live cloud run … without asking" contradict the billing contract agents are also told to follow. llp/0015-backend-selection-and-config.rfc.md:67 says an EAS Simulator session (eas simulator) costs credits from the moment it starts, and only after a person chose --eas or deviceBackend: "eas". llp/0022-live-tier.plan.md:58 says a tier that can bill money must be asked for by name, and :267-269 gates live-cloud on AGENT_CLI_LIVE_CLOUD=1 so a machine that already has the other prerequisites does not start a billing session by accident. e2e-live/RUNBOOK.md:40 and :266 require both AGENT_CLI_LIVE_EAS=1 and AGENT_CLI_LIVE_CLOUD=1, a login with expo-ci access (not a human account), and label bun run test:live:cloud as billing a cloud session. .eas/workflows/agent-cli-cloud-e2e.yml:12-16 already runs that suite on every PR: each job that reaches a session bills one, four billed sessions per push. A session that never becomes ready is still billed (e2e-live/__tests__/live-cloud-test.ts cost note; llp/0022 cleanup section). Public EAS pricing is the same shape: paid plans include 60 simulator minutes a month, then $0.10 per minute, billed per second. An agent that treats this as free and skips the ask will start extra sessions, often on the ambient Expo login rather than expo-ci, and the next bullet ("test both platforms") makes two of them the default.
Suggestion: Drop "usually free" and "without asking." Say a check may start a session only when the local or stub suite cannot answer it, on the expo-ci account, with AGENT_CLI_LIVE_EAS=1 and AGENT_CLI_LIVE_CLOUD=1 (or an explicit dev --<platform> --eas the person already chose). Point at bun run test:live:cloud from packages/@expo/agent-cli after bun run build. Say CI may already have billed the four cloud jobs, so do not start another unless that evidence is missing. Stop the session before finishing (dev:stop --eas or the suite's afterAll); a failed start still needs simulator:stop.
There was a problem hiding this comment.
Took the suggestion. The bullet now says a change to the EAS path is proven only on EAS, that a session bills from start (llp/0015), that it starts only through the opt-ins on expo-ci after the local or stub suites cannot answer, that CI already bills four sessions per push, and how to stop it, including a failed start.
|
|
||
| ## Pull requests | ||
|
|
||
| - This repo uses GitHub stacks. Manage stacked PRs with the `gh stack` CLI: `gh stack init`, `add`, `submit`, `sync` and `rebase`. Do not build a stack from hand-pushed branches. |
There was a problem hiding this comment.
[suggestion] gh stack init, add, submit, sync, and rebase are real subcommands of the github/gh-stack extension, and scripts/stack-gate.ts waits on the base-branch chain gh stack submit creates. Stock gh does not ship stack (gh extension list shows github/gh-stack). The same bullet forbids hand-pushed branches, so a checkout without the extension has no allowed way to open a stack and fails with an unknown command.
Suggestion: Name the prerequisite next to the commands: gh extension install github/gh-stack (GitHub CLI 2.0+ and Git 2.36+). Keep the ban on hand-pushed stacks once that path exists.
There was a problem hiding this comment.
Added the install line with the GitHub CLI 2.0+ and Git 2.36+ requirement, plus the gh-stack agent skill (gh skill install github/gh-stack) with a link. The ban on hand-pushed stacks stays.
…skill The pitch lives in the Feature prompt of the template. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Thanks. AGENTS.md now points at the PR template and says to fill it in also when a CLI or an agent opens the PR. The pitch is in the template: the Feature prompt asks for two or three sentences on what agents can now do and why. The root AGENTS.md and the research notes are gone; the four rules live in the package guide. |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Adds a PR template and extends the package
AGENTS.mdwith rules on stacked PRs, verification, obsolete tests, platform coverage and EAS sessions. Docs only;bun run format:checkpassed.🤖 Generated with Claude Code