Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/checks-gate-self-service.md
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 7 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <n> --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
Expand Down
15 changes: 13 additions & 2 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <n> --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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions prompts/checks-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <label>`, following the repo's own rule for which. A comment asking a human to do it is the right move only when the docs reserve that decision to a person.
5. **Verify** — re-run `{{CHECK_COMMAND}}` and `{{TEST_COMMAND}}` and fix any remaining failures that are not baseline-only.
6. **Commit** — one or more commits with the `Phoebe:` prefix. Do **not** force-push.
7. **Push** — `git push origin {{PR_BRANCH}}`.
Expand Down
Loading