From a38aa3042a7d997acbec1ab8b7479d8848b8ba12 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Sun, 5 Apr 2026 11:03:03 +0900 Subject: [PATCH] chore: add agent instruction for pr creation (#10059) Co-authored-by: Claude Sonnet 4.6 --- .github/workflows/pr-labeled-automated.yml | 21 +++++++++++++++++++++ AGENTS.md | 10 ++++++++++ CLAUDE.md | 12 +----------- 3 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/pr-labeled-automated.yml diff --git a/.github/workflows/pr-labeled-automated.yml b/.github/workflows/pr-labeled-automated.yml new file mode 100644 index 000000000..15c1a357b --- /dev/null +++ b/.github/workflows/pr-labeled-automated.yml @@ -0,0 +1,21 @@ +name: Label Automated PR + +on: + pull_request: + types: [opened, edited] + +permissions: + pull-requests: write + +jobs: + label: + runs-on: ubuntu-latest + if: contains(github.event.pull_request.body, '') + steps: + - name: maybe automated + uses: actions-cool/issues-helper@71b62d7da76e59ff7b193904feb6e77d4dbb2777 # v3.7.6 + with: + actions: add-labels + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + labels: maybe automated diff --git a/AGENTS.md b/AGENTS.md index 5793473a6..1d3787d41 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -158,3 +158,13 @@ If you need to typecheck tests, run `pnpm typecheck` from the root of the worksp - Check existing issues and documentation - Review CONTRIBUTING.md for detailed guidelines - Follow patterns in existing code + +## PR Descriptions + +When creating a pull request, you MUST include the following HTML comment at the bottom of the PR description: + +``` + +``` + +This allows maintainers to identify AI-assisted PRs for triage. PRs containing this marker will be automatically labeled `maybe automated` and will be closed in 3 days unless a real person confirms ownership. diff --git a/CLAUDE.md b/CLAUDE.md index ca0892328..43c994c2d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,11 +1 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## Codebase Overview - -Vitest is a next-generation testing framework powered by Vite. This is a monorepo using pnpm workspaces. - -## Essential references - -- Agent-specific guide: See [AGENTS.md](AGENTS.md) +@AGENTS.md -- 2.51.2