Skip to content

feat: an agent checks a change locally first, then on the PR's preview - #72

Merged
mauricios merged 1 commit into
mainfrom
feat/check-local-then-preview
Oct 15, 2026
Merged

mauricios merged 1 commit into
mainfrom
feat/check-local-then-preview

Conversation

@mauricios

@mauricios mauricios commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Why

In an adopting project, the developer kept asking agents to "push it and check on the preview". Agents also went to the preview on their own: they opened its pages and called its API, sometimes before checking the change locally, and once ran the end-to-end suite against it. The framework said only "browser checks only when asked or for a visual change", so it never said what an agent checks itself, or in what order.

What changed

  • skeleton/AGENTS.md:
    • § Delivery rules, "Check locally first, then on the preview":
      • Before the developer's local check and before any push, the agent walks the changed flow on its checkout's own environment.
      • Then, when the project has previews and the change is something a person sees or uses, it walks the same flow on the draft's preview once it deploys: read-only, in a browser, never the end-to-end suite. It records what it saw in the pull request.
      • It's evidence, not the QC: the developer's check on the preview still decides ready.
    • § Working economically: the browser-checks line now says locally first, then the preview.
    • § Quick reference: a new Preview line says where previews deploy. "None" turns the preview step off.
  • /adf:open-pr:
    • The agent checks the flow itself before offering the local check.
    • A new step 7 waits for the preview's deploy in the background, never with a polling loop, then walks the flow and records it with gh pr edit. A difference from local goes to the developer with what differs, instead of a retried deploy.
    • The body gains Local check and Preview lines, plus a rationalization row and a verification line.
  • No nudges to review, ready, or merge. In the same project, agents ended task after task with "review it, mark it ready", or "mark it ready yourself, or ask me to", because /open-pr's report asked for it. The report now gives the URL, that it's a draft, and what was and wasn't verified. It doesn't ask, remind, or offer to review, ready, or merge, and never requests reviewers. AGENTS.md and git-workflow.md say the same. The ask rules on gh pr ready/merge/review stay.
  • Rules: testing.md (the end-to-end suite runs only locally; browser checks go locally, then on the preview) and git-workflow.md (check it on the preview too).
  • github module: the PR template gains Local check and Preview lines.
  • Decision 0039 amends 0022. A changelog entry carries the upgrade impact.

For reviewers

  • Read-only on the preview. A preview is shared and may reach real services, so the agent's walk submits nothing that reaches a person or shared data unless the developer asks. A flow that writes is covered by the local check, and the body says what the preview walk left out.
  • The wait runs in the background: gh pr checks <n> --watch as a background command.
  • Decision numbering: 0038 is in fix: fewer prompts — make tasks once checked, local git work, commands rules can read #71, which is still open, so this is 0039. Both PRs add a changelog entry and an index row, so whichever merges second needs a sync with main.

Verification

  • ./evals/run-evals.sh: all suites pass, with five new static checks: the AGENTS.md rule, its Preview line, /open-pr's preview step, its report without nudges, and the git-workflow rule.
  • python3 scripts/build-committed.py --check: the round trip holds, with 65 files.
  • Not verified: an agent running the new step against a real preview.

🤖 Generated with Claude Code

…t's preview

In an adopting project, the developer kept asking agents to "push it and
check on the preview", and agents went to the preview on their own too —
sometimes before checking locally, once running the end-to-end suite against
it. The framework said only "browser checks only when asked".

- AGENTS.md § Delivery rules: check locally first — before the developer's
  local check and any push — then, when the project has previews and the
  change is something a person sees or uses, walk the same flow on the draft's
  preview once it deploys: read-only, in a browser, never the e2e suite, and
  record it in the pull request. The developer's QC still decides ready.
  § Quick reference gains a Preview line ("none" turns the step off).
- /open-pr: the agent checks the flow itself before the local check; a new
  step 7 waits for the preview in the background and records what it saw; the
  body gains Local check and Preview lines.
- The testing and git-workflow rules, and the github module's pull request
  template, follow.

Decision 0039 amends 0022.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mauricios
mauricios marked this pull request as ready for review October 15, 2026 19:50
@mauricios
mauricios merged commit b5afde2 into main Oct 15, 2026
1 check passed
@mauricios
mauricios deleted the feat/check-local-then-preview branch October 15, 2026 19:51
mauricios added a commit that referenced this pull request Oct 15, 2026
…'s entries

The conflicts were the two pull requests adding beside each other: the
changelog's Unreleased entries, and decisions 0038 and 0039 in the index.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant