From 6917fc071bf41d1da403d9198538c5a2f55269a0 Mon Sep 17 00:00:00 2001 From: Andrea Griffiths Date: Mon, 8 Jun 2026 18:57:26 -0400 Subject: [PATCH 1/3] Add agent PR labeling workflow --- .github/workflows/label-agent-prs.yml | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/label-agent-prs.yml diff --git a/.github/workflows/label-agent-prs.yml b/.github/workflows/label-agent-prs.yml new file mode 100644 index 000000000..b30b52f94 --- /dev/null +++ b/.github/workflows/label-agent-prs.yml @@ -0,0 +1,56 @@ +name: label-agent-prs + +on: + pull_request: + types: + - opened + - reopened + +permissions: + contents: read + pull-requests: write + issues: write + +jobs: + label-agent-prs: + if: github.event.pull_request.user.type == 'Bot' || contains(github.event.pull_request.user.login, 'copilot') + runs-on: ubuntu-latest + steps: + - name: Ensure robot label exists + uses: actions/github-script@v7 + with: + script: | + const labelName = 'robot'; + const labelColor = '5319E7'; + const labelDescription = 'Pull request created by a bot or automated agent'; + + try { + await github.rest.issues.getLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + name: labelName, + }); + } catch (error) { + if (error.status === 404) { + await github.rest.issues.createLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + name: labelName, + color: labelColor, + description: labelDescription, + }); + } else { + throw error; + } + } + + - name: Add robot label to PR + uses: actions/github-script@v7 + with: + script: | + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['robot'], + }); From cd1e6a6fad1194704d018dae8855c60f3ea14130 Mon Sep 17 00:00:00 2001 From: Andrea Griffiths Date: Mon, 8 Jun 2026 19:00:21 -0400 Subject: [PATCH 2/3] Add AGENTS guidance for automated agents --- AGENTS.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..decba03b6 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,11 @@ +# AGENTS.md + +## Repository guidance for automated agents + +- Keep changes minimal and focused on the task. +- Preserve existing content structure and frontmatter field names in `content/**/*.md`. +- Do not rename or remove required frontmatter keys. +- For ownership or reviewer changes, update `CODEOWNERS` only when explicitly requested by repo policy. +- Prefer existing project patterns and avoid unrelated refactors. +- Before claiming a change is ready, run the repo checks that already exist: `npm test -- --runInBand` and `npm run lint`. +- If you open or update a PR, use a clear description and avoid introducing unrelated files. From c7e8b44f1ffb8e9b37f34f9682dd25ba39765dc9 Mon Sep 17 00:00:00 2001 From: Andrea Griffiths Date: Mon, 8 Jun 2026 20:19:05 -0400 Subject: [PATCH 3/3] Refine AGENTS guidance for automation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- AGENTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index decba03b6..055d95ba0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,6 +6,8 @@ - Preserve existing content structure and frontmatter field names in `content/**/*.md`. - Do not rename or remove required frontmatter keys. - For ownership or reviewer changes, update `CODEOWNERS` only when explicitly requested by repo policy. +- Do not change workflows, labels, permissions, branch protection, or automation behavior unless explicitly requested. +- If a change affects repository policy or automation, ask before applying it. - Prefer existing project patterns and avoid unrelated refactors. - Before claiming a change is ready, run the repo checks that already exist: `npm test -- --runInBand` and `npm run lint`. - If you open or update a PR, use a clear description and avoid introducing unrelated files.