diff --git a/.changeset/checks-gate-self-service.md b/.changeset/checks-gate-self-service.md new file mode 100644 index 00000000..a016f597 --- /dev/null +++ b/.changeset/checks-gate-self-service.md @@ -0,0 +1,5 @@ +--- +"phoebe-agent": patch +--- + +The checks prompt clears a documented policy gate itself: it writes the missing file or applies the label the repo's docs call for, instead of leaving a comment asking a maintainer to. diff --git a/AGENTS.md b/AGENTS.md index 2df25314..ff85bfda 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -64,8 +64,13 @@ Three things it does not touch: ## Every PR carries a changeset The `changeset` CI check fails any PR that touches `phoebe-agent` without a -Markdown file under `.changeset/` — write one before pushing. Format, the -`skip-changeset` label for no-release PRs, and why empty changesets don't pass: +Markdown file under `.changeset/` — write one before pushing. A PR that changes +nothing a consumer would notice (docs, CI, tests, a `devDependencies` or tooling +bump) takes the `skip-changeset` label instead; apply it yourself with +`gh pr edit --add-label skip-changeset` rather than asking a maintainer. On +a Renovate PR the split is by dependency type: a runtime `dependencies` bump +gets a `patch` changeset whose summary is the PR title, anything else gets the +label. Format, and why empty changesets don't pass: [`docs/releasing.md`](docs/releasing.md). ## Installing Phoebe into a target repo diff --git a/docs/releasing.md b/docs/releasing.md index 191058c0..0d2332aa 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -23,8 +23,14 @@ automatically. The [`changeset`](../.github/workflows/changeset.yml) workflow enforces this on every PR: it runs `changeset status` against the base branch and fails the check if the package changed with no pending changeset. Docs-only, CI-only, - or test-only PRs still don't need one. A maintainer labels those - `skip-changeset` and the gate skips itself, and applying the label re-runs it. + or test-only PRs still don't need one. Label those `skip-changeset` and the + gate skips itself; applying the label re-runs it. Anyone whose token can + write labels does this, Phoebe included: + + ```sh + gh pr edit --add-label skip-changeset + ``` + An _empty_ changeset does **not** get past the gate, despite what the CLI's error text suggests: it releases no package, so `changeset status` keeps failing. The "chore: version packages" PR is exempt by branch name, since @@ -97,6 +103,11 @@ changeset; Phoebe re-adds it on the next cycle. The churn is accepted. Every bump no consumer would notice opens labelled `skip-changeset` by Renovate itself, so this path only ever runs for the bumps that earn a changelog line. +Renovate labels only the PRs it opens after a rule lands, and never relabels +one already open, so a bump that predates the rule in `renovate.json` arrives +red with no label. Phoebe applies the same split itself, by dependency type: a +runtime `dependencies` bump gets the changeset, anything else gets the label. + ## The workspace apps ride the root version The repo is a pnpm workspace, and the packages under `apps/*` are private. They diff --git a/prompts/checks-prompt.md b/prompts/checks-prompt.md index 41e9edf7..3333d18a 100644 --- a/prompts/checks-prompt.md +++ b/prompts/checks-prompt.md @@ -39,6 +39,7 @@ You are Phoebe — fixing **failing CI** on an existing PR branch in this reposi - **Failures absent from the baseline → attributable to this change.** These are yours; fix them in the next step. - **Reconciling disagreeing gates:** a green `{{CHECK_COMMAND}}` with a red `{{TEST_COMMAND}}` clears you to proceed **only** when every red test is baseline-only. If any failing test is _not_ present on the baseline, `{{CHECK_COMMAND}}` passing does not excuse it — fix that test. 4. **Fix** — make the smallest correct change that resolves the failures **attributable to this change** (those not present on the baseline). + - **A policy gate is satisfied, not coded around.** A check that fails because the PR lacks a required file or label (a changeset, a `skip-*` label) is yours to clear when the repo's docs say what satisfies it. Write the file, or apply the label with `gh pr edit {{PR_NUMBER}} --add-label