Problem
During compliance remediation (2026-04-06), multiple autonomous agents independently picked up related compliance issues and produced overlapping/conflicting PRs:
This wasted effort and required manual triage to pick winners and close duplicates.
Solution: Claimed Labels + Umbrella Issues
1. Claimed labels (in-progress)
When an agent begins work on an issue, it immediately adds an in-progress label before writing any code. Other agents MUST skip issues with this label.
Changes needed:
- Add
in-progress label (color: #fbca04, description: "An agent is actively working this issue") to the standard label set in github-settings.md and apply-repo-settings.sh
- Update
AGENTS.md (org-level and per-repo) with the rule:
Before starting work on any issue:
1. Check if the issue has an `in-progress` label — if so, skip it
2. Check if any open PR already references the issue — if so, skip it
3. Add the `in-progress` label to the issue before writing code
4. Remove the label if you abandon the issue without a PR
- Update the Claude Code workflow to grant the
claude job permission to add labels
2. Umbrella issues for compliance audit runs
The compliance audit script (compliance-audit.sh) should create a single umbrella issue per audit run that:
- Lists all findings grouped by remediation category (not individual findings)
- Links to the individual finding issues
- Provides a suggested work breakdown so one agent handles related findings together
Remediation categories (group these together):
| Category |
Findings Grouped |
Rationale |
| Repo settings |
allow_auto_merge, delete_branch_on_merge, has_wiki, has_discussions |
All fixed by apply-repo-settings.sh |
| Labels |
All missing-label-* findings |
All fixed by apply_labels() in one script |
| Rulesets |
missing-pr-quality, missing-code-quality |
Both managed by apply-rulesets.sh |
| Workflows |
missing-ci.yml, missing-codeql.yml, missing-agent-shield.yml, etc. |
Per-repo workflow additions |
| CLAUDE/AGENTS refs |
claude-md-missing-agents-ref, agents-md-missing-org-ref |
Per-repo doc updates |
| CODEOWNERS |
missing-codeowners |
Per-repo file addition |
Changes needed in compliance-audit.sh:
- After all findings are processed, emit a summary issue titled "Compliance audit — YYYY-MM-DD" with findings grouped by category
- Each category links to the individual issues and names the remediation script/approach
- Assign the
claude label to the umbrella issue (not individual findings) to trigger one coordinated agent run
3. Agent file-conflict check
Add to AGENTS.md:
Before creating a new file, check if any open PR already creates that file:
gh pr list --repo <repo> --state open --json files --jq '.[].files[].path' | grep <filename>
If found, comment on the existing PR instead of creating a competing one.
Acceptance criteria
Context
Discovered during review of 9 compliance PRs where 3 had to be closed as duplicates. See conversation on PRs #64, #65, #66 for details.
Problem
During compliance remediation (2026-04-06), multiple autonomous agents independently picked up related compliance issues and produced overlapping/conflicting PRs:
apply-rulesets.shfrom scratch for different rulesetssetup-branch-protection.shcovering overlapping scopeThis wasted effort and required manual triage to pick winners and close duplicates.
Solution: Claimed Labels + Umbrella Issues
1. Claimed labels (
in-progress)When an agent begins work on an issue, it immediately adds an
in-progresslabel before writing any code. Other agents MUST skip issues with this label.Changes needed:
in-progresslabel (color:#fbca04, description: "An agent is actively working this issue") to the standard label set ingithub-settings.mdandapply-repo-settings.shAGENTS.md(org-level and per-repo) with the rule:claudejob permission to add labels2. Umbrella issues for compliance audit runs
The compliance audit script (
compliance-audit.sh) should create a single umbrella issue per audit run that:Remediation categories (group these together):
allow_auto_merge,delete_branch_on_merge,has_wiki,has_discussionsapply-repo-settings.shmissing-label-*findingsapply_labels()in one scriptmissing-pr-quality,missing-code-qualityapply-rulesets.shmissing-ci.yml,missing-codeql.yml,missing-agent-shield.yml, etc.claude-md-missing-agents-ref,agents-md-missing-org-refmissing-codeownersChanges needed in
compliance-audit.sh:claudelabel to the umbrella issue (not individual findings) to trigger one coordinated agent run3. Agent file-conflict check
Add to
AGENTS.md:Acceptance criteria
in-progresslabel exists in standard label set and is created byapply-repo-settings.shAGENTS.mdincludes claim-before-work and file-conflict-check rulescompliance-audit.shcreates a grouped umbrella issue per audit runcompliance-auditlabel but NOT theclaudelabelclaudelabel to trigger coordinated remediationContext
Discovered during review of 9 compliance PRs where 3 had to be closed as duplicates. See conversation on PRs #64, #65, #66 for details.